Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Experts,
I have a Oracle view which contains 4 to 5 tables to load data. Now initially All the data returned by the view has been loaded at the current date.
Now what is the best approach to add only new data i-e updates in previous data and inserts from current date onward.
Regards,
Zahid Rahim
if you have stored data into qvd then you can get Max(Date) from that Qvd
MaxDate:
Load
Max(Date) as LastUpdatedDate
from......PreviouslyLoaded.qvd
(qvd);
Let vDate = date(peek('LastUpdatedDate'));
OracleNewData:
Sql Select *
From ..Source
Where DateField > Date($(vDate)) ; // Here date format should match with the one with the Oracle date field
take a look at Incremental Load.docx
Thank you all for the responses but the problem is Last Update Date will be in 5 tables. How to manage 5 different last update dates.
Can you share a script of oracle view for current date
Dear Shraddha,
Oracle View can be of below format:
SELECT t1.columns, t1.LAST_UPDATE_DATE
t2.columns, t2.LAST_UPDATE_DATE,
t3.columns, t3.LAST_UPDATE_DATE,
t4.columns, t4.LAST_UPDATE_DATE,
t5.columns, t5.LAST_UPDATE_DATE,
FROM t1,t2,t3,t4,t5
WHERE <All tables join>
Now with 5 different last_update_dates how can we effectively write incremental load script?
Regards,
Zahid Rahim