1 Reply Latest reply: Aug 24, 2011 4:26 AM by BlackRockS RSS

    Incremental load when composite key

      I am trying to do an incremental load for a table having composite key. I create a primary_key while loading the incremental portion and also create a primary_key while loading from the qvd. The where not exists(primary_key) check gives the 'Field not found' error.

       

      $(tableName):

      LOAD name&surname as $(primaryKeyColumn),

          name,

          surname,

          `modified_date`;

      SQL SELECT *

      FROM `qv_test`.names

      Where $(lastModifiedColumn) > '$(startDate)' and $(lastModifiedColumn) < '$(endDate)';

       

      Concatenate ($(tableName))

      LOAD  name&surname as $(primaryKeyColumn),

        name,

        surname,

        `modified_date`

      From $(qvdPath)$(tableName).qvd (qvd)

      Where not (Exists($(primaryKeyColumn)));

       

      Could you help me with how to get incremental load when there is a composite key.