Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I am performing partial reload multiple times to append data for the current month. Previous month's data remains as it is.
Attached is my script and the data.
I dont have a primary key in the data so i am not able to write exists not and where clause.
All I need is that the new Project Months get appended to the existing data as an when I add the details of the current month. When I create a new partial reload to add data of the current month, data of the earlier months that was added using previous partial reloads gets duplicated. Anybody please help me whats going wrong?
Try this approach:
Table:
LOAD YourColumns,
0 as DataFlag
FROM Source;
IF IsPartialReload() then
NewTable:
NoConcatenate
Add Only LOAD YourColumns,
1 as DataFlag
FROM NewSource;
IF (NoOfRows('FinalTable') > 0) then
Table:
NoConcatenate
Add Only LOAD *
Resident FinalTable
Where DataFlag = 0;
DROP Table FinalTable;
ENDIF;
FinalTable:
NoConcatenate
Add Only LOAD *
Resident Table;
Concatenate (FinalTable)
Add Only LOAD *
Resident NewTable;
DROP Tables NewTable, Table;
ENDIF;
UPDATE: Made some changes in the red