Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
hugmarcel
Specialist
Specialist

Right Keep () during Partial Reload possible?

Hi

I want to reduce data in my dimension tables as such while performing a partial reload:

<loop...>

  RIGHT KEEP ($(vTable)) LOAD DISTINCT * RESIDENT LINK_TABLE;

<... end loop>

It does not work, the statement is executed (visible in the logfile), but nothing happens and vTable keeps its original row numbers.

Any idea?

Thank you - Marcel

 

1 Reply
hugmarcel
Specialist
Specialist
Author

It seems to me that right keep does not work with partial load, as replace and add statements before load are not accepted.

Another method to reduce data could be - but much more complicated:

 

CALL CreateDimensionTablesString;  // create a string containing all dimension tables

LET aa = 1;

LET vTable = SUBFIELD('$(sDIMENSION_TABLES)',';',$(aa));

DO WHILE 1

    IF (LEN('$(vTable)') = 0) THEN

      EXIT DO

    END IF

IF (NOT MATCH('$(vTable)', '$(ignoreTables)')) THEN

     CALL getUniqueKeyFieldForTables ( '$(vTable)', 'LINK_TABLE' );  // search the keyfield to the LINK_TABLE

     t:

     NOCONCATENATE ADD LOAD * RESIDENT $(vTable);

     LEFT JOIN (t) ADD LOAD DISTINCT $(KEY_FIELD), 1 AS EXIST RESIDENT LINK_TABLE;    

     DROP TABLE $(vTable);

     $(vTable):

      NOCONCATENATE ADD LOAD * RESIDENT t WHERE EXIST = 1;

      DROP TABLE t;

      DROP FIELD EXIST;

    END IF

    LET aa = $(aa) + 1;

    LET vTable = SUBFIELD('$(sDIMENSION_TABLES)',';',$(aa));

Instead of parsing a string with all dimenion tables, looping through NoOfTables will pose problems because of the drop table

statements, what affects internal table numbers.

Still, an easier method will be highly appreciated.

Marcel

LOOP