4 Replies Latest reply: Feb 5, 2013 10:47 AM by Brian Garside RSS

    Add a column from inline to two tables with resident load

      Hi Experts,

       

      I have a problem with my script.  I have two Tables that have task schedule data which have identical structure. They automatically concatenate which is fine, but I would like to know where to add an explicit command rather than the implicit.

       

      Secondly and most important I need to add a Column called Source. This will be used to identify which data is being used so the user can toggle between both data tables.

       

      the data is very simple for the Source Inline table. I attached the full load script for review.

       

      Source:
      LOAD * INLINE [
      Source
      4.2A
      4.2B
      ]
      ;

       

      ExtendedAttribute4.2A:
      LOAD FieldID,
      FieldName,
      Alias,
      Guid,
      SecondaryPID,
      SecondaryGuid,
      %Key_Project_59FE1CDD36903AAC    // Auto generated Key to parent table: Task_4.2A
      FROM [4.2A.xml]  (XmlSimple, Table is [Project/ExtendedAttributes/ExtendedAttribute]);

       

      Task_4.2A:
      LOAD UID,
      ID,
      Name,
      Active,
      Manual,
      Type,
      IsNull,
      CreateDate,

      FROM [4.2A.xml]  (XmlSimple, Table is [Project/ExtendedAttributes/ExtendedAttribute]);

       

      NoConcatenate

       

      ExtendedAttribute4.2B:
      LOAD FieldID,
      FieldName,
      Alias,
      Guid,
      SecondaryPID,
      SecondaryGuid,
      %Key_Project_59FE1CDD36903AAC    // Auto generated Key to parent table: Task_4.2B

      FROM [4.2B.xml]  (XmlSimple, Table is [Project/ExtendedAttributes/ExtendedAttribute]);

       


      Task_4.2B:
      LOAD UID,
      ID,
      Name,
      Active,
      Manual,
      Type,
      IsNull,
      CreateDate,

      FROM [4.2B.xml]  (XmlSimple, Table is [Project/ExtendedAttributes/ExtendedAttribute]);

       

      //Left Join (Task_4.2B)

      //Load If(Source='4.2B','4.2B','4.2B') as Source

      //Resident Source;

       

      //Left Join (Task_4.2A)

      //Load If(Source='4.2A','4.2A','4.2A') as Source

      //Resident Source;