Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
ID | Category | Sales | Test |
1000 | ABC | 2000 | X |
1010 | ABX | 1200 | X |
1020 | BCA | 1500 | X |
1030 | FVC | 2500 | Y |
1040 | KNM | 3500 | Y |
1050 | hnn | 1290 | X |
1060 | yyy | 1580 | X |
1070 | Auuu | 1289 | X |
Actually i have one requirement, i want to do Partial reload..
i know concept partial reload... Using ADD attributes
ADD Load ID,
Category,
Sales,
Test
From Table_Name;
If i am reload 2 times, it's coming duplicate values..
i want to load only new records... (using Partial reload)....
Thanks in Advance.........
I don't think this script requires IF IsPartialReload() then and the Exit Script, below in itself should be enough:
Student:
ADD LOAD ID,
Test
FROM
table_Name;
Because Add will only work during Partial Reload and there are no other DROP, LET, RENAME statements in here which will unintentionally run during Partial Reload
Right, but Where not exists needed to avoid duplicates in case partial load is run more than once, -
Load * inline [
ID, Category, Sales, Test
1000, ABC, 2000, X
1010, ABX, 1200, X
1020, BCA, 1500, X
1030, FVC, 2500, Y
1040, KNM, 3500, Y
1050, hnn, 1290, X
1060, yyy, 1580, X
1070, Auuu, 1289, X
];
Add Load *
inline [
ID, Category, Sales, Test
1080, ABC, 2000, X
1090, ABX, 1200, X
1100, BCA, 1500, X
] Where not exists(ID);
Nice trick Sunny T. Thank you.