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: 
Not applicable

Easey question regarding the Resident command.

Hello all, How does the command Resident work? Should'nt this code give me a table called ODS? This results in nothing...

tmpODS:LOAD SalesUnit, ProductionUnitFROM qvd\ODS.qvd (qvd);ODS:load *resident tmpODS;drop table tmpODS;
Br Cristian

1 Solution

Accepted Solutions
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Resident works OK, just the way you expected. Your problem is a classic "automatic concatenation problem". Since you are loading "*", your table ODS has exactly the same fields as the table tmpODS, and the two tables are automatically concatenated into tmpODS, which is being dropped.

To prevent the problem, add keyword NOCONCATENATE in front of the second load:

tmpODS:
LOAD
SalesUnit, ProductionUnit
FROM qvd\ODS.qvd (qvd);
ODS:
NOCONCATENATE load *
resident tmpODS;
drop table tmpODS;

View solution in original post

3 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Resident works OK, just the way you expected. Your problem is a classic "automatic concatenation problem". Since you are loading "*", your table ODS has exactly the same fields as the table tmpODS, and the two tables are automatically concatenated into tmpODS, which is being dropped.

To prevent the problem, add keyword NOCONCATENATE in front of the second load:

tmpODS:
LOAD
SalesUnit, ProductionUnit
FROM qvd\ODS.qvd (qvd);
ODS:
NOCONCATENATE load *
resident tmpODS;
drop table tmpODS;

Not applicable
Author

Thank you! I have been trying different ways for hours! A beginners problem ;D

Br

cristian

Not applicable
Author

Your code works ok. it will create two tables tmpODS and ODS ...Both the tables will joined together cos all the fields in the table are same(it will create Syn keys).You are loading data in to second table using Resident and droping that temporary table tmpODS. If you want to retain both tables and dont want any relationship b/w those tables ,you could noconcatenate keyword.IF you use noconcatenate keyword before loading, there would be any relationships b/w those two tables.In that case, you dont need to drop it...You can drop the temporary table ,if you wish to reduce data loading in memory