Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need help on incremental load on below tables:
[Data]:
Load * Inline [
ID, Name, Roll
1, 'Sandip', 12
2, 'Jimmy', 16
3, 'Larry', 19
3, 'test 527', 1893,
7, 'Test 7', 89
7, 'Test77', 90
];
[IncrementalLoad]:
Load * Inline [
ID, Name, Roll
1, 'Sandip', 60
2, 'test2', 163, 'Test 4', 100
4, 'test 57', 189
5, 'test 167', 345,
1, 'Sandip', 60
];
Now I want that the Final load will be:
ID, Name, Roll
1, 'Sandip', 60
2, 'test2', 163, 'Test 4', 100
3, 'test 527', 1893,
4, 'test 57', 189
5, 'test 167', 345
Any Idea how to do that?
[Data]:
Load * Inline [
ID, Name, Roll
1, 'Sandip', 12
2, 'Jimmy', 16
3, 'Larry', 19
3, 'test 527', 1893,
7, 'Test 7', 89
7, 'Test77', 90
];
NoConcatenate
[IncrementalLoad]:
Load * Inline [
ID, Name, Roll
1, 'Sandip', 60
2, 'test2', 16
3, 'Test 4', 100
4, 'test 57', 189
5, 'test 167', 345,
1, 'Sandip', 60
];
[INR Key Compare]:
load distinct ID Resident [IncrementalLoad];
NoConcatenate
[Final Load]:
load ID, Name, Roll Resident [IncrementalLoad];
concatenate
load * Resident [Data]
where not Exists(ID);
NoConcatenate
[Final Load2]:
load distinct ID, Name, Roll Resident [Final Load];
left join (Data)
load * Resident Data;
drop tables [Data], [IncrementalLoad], [Final Load], [INR Key Compare];
Hi there,
use below -
[IncrementalLoad]:
Load * Inline [
ID, Name, Roll
1, 'Sandip', 60
2, 'test2', 163,
3, 'Test 4', 100
4, 'test 57', 189
5, 'test 167', 345,
];
[Data]:
Load * Inline [
ID, Name, Roll
1, 'Sandip', 12
2, 'Jimmy', 16
3, 'Larry', 19
3, 'test 527', 1893,
7, 'Test 7', 89
7, 'Test77', 90
]where not exists(ID);
inner join
[IncrementalLoad]:
Load * Inline [
ID, Name, Roll
1, 'Sandip', 60
2, 'test2', 163,
3, 'Test 4', 100
4, 'test 57', 189
5, 'test 167', 345,
];
You Will get output like --
For Implementing Incremental load you data should have date field based on which you differentiate incoming data.
Please refer below for more on Incremental load.