Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I am facing difficulty in implementing the incremental load using a composite key. Below are the details on which I'm working.
This is the raw data set:
Region | Code | Stock | Date |
N | 1234 | 100 | 1/10/2019 |
S | 2345 | 120 | 1/10/2019 |
W | 1278 | 134 | 1/10/2019 |
E | 7890 | 140 | 1/10/2019 |
S | 2345 | 85 | 2/10/2019 |
E | 7890 | 35 | 2/10/2019 |
W | 1278 | 100 | 2/10/2019 |
N | 1234 | 75 | 2/10/2019 |
My Expected result with Insert and Update Incremental load should be like:
Region | Code | Key | Stock | Date |
S | 2345 | S-2345 | 85 | 2/10/2019 |
E | 7890 | E-7890 | 35 | 2/10/2019 |
W | 1278 | W-1278 | 100 | 2/10/2019 |
N | 1234 | N-1234 | 75 | 2/10/2019 |
Vobhilineni, did either of the posts help you get things working as you expect? If so, please be sure to use the Accept as Solution button on the post(s) that helped. If you are still trying to sort things out, please leave an update, and if you did something different, consider posting that and mark that as the solution for others that run across this in the future.
Regards,
Brett
Hi,
Before Incremental,do a full load with composite key. After generating composite Key follow incremental steps.
Follow same steps for incremental load .store recent date in variable .
For Incremental data (Insert) use this.
WHERE Date >= $(latestvariable) ;
Update:
Concatenate
LOAD
*
FROM [lib://QVDLOAD/.qvd]
(qvd)
where not Exists(Key);
Vobhilineni, did either of the posts help you get things working as you expect? If so, please be sure to use the Accept as Solution button on the post(s) that helped. If you are still trying to sort things out, please leave an update, and if you did something different, consider posting that and mark that as the solution for others that run across this in the future.
Regards,
Brett