Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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;
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;
Thank you! I have been trying different ways for hours! A beginners problem ;D
Br
cristian
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