Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
How to perform incremental load on 250 tables in single reload.
if my tables are less then we can try with below code.in my case table count is 250 means I need to write 250 times ???
is there any better way to do this so that it can save my time.
1)I have total 250 tables in oracle.firstly i have converted tables into qvd's. it took 13 hours.it's ok np.
2)Now daily huge transaction data is adding daily now i need to do incremental load (insert only)
3)Is there any script that loop through 250 tables and perform incremental load.please guide me.
4)In community some one told we can achive by using sub-routine but i dont't know how to use.
----------------------------------------------------------------------------------------------------------------------------------------
The same thing i need to implement incremental for 680 from sql database (incremental load)
Please share any script which can perform incremental load dinamically.
Hi Randi,
i have total 250 tables i have converted them qvd format.then i need to refresh this qvd's daily.so i chosed incremental load.
As you told i need to write a script that loops through the 250 Qvd's (qvd's names are different)
Please guide how to write that loop script
if all your QVD's are in a single folder then just the below will do
LOAD *
FROM
[Fullpath\*.qvd]
(QVD);
It sounds like you're looking for something more like this:
//Where files exist
LET File_Path = chr(39) & '..\Data\QVD\' & chr(39)
;
TableList:
LOAD * INLINE [
Table_Name
Sales
Products
Employees
Locations
];
For Each vTable in FieldValueList('Table_Name')
let vQVDName = chr(39) & $(File_Path) & vTable & '.qvd' & chr(39);
let vFileName = chr(39) & $(File_Path) & vTable & '.xlsx'& chr(39);
//Get Max Modified Date. using where not exists pulls only distinct dates
Temp:
Load
Modified_Date
from
$(vQVDName)
(qvd)
where not exists(Modified_Date);
Last_Updated_Date:
load
max(Modified_Date) as MaxDate
Resident Temp;
let Last_Updated_Date = peek('MaxDate',0,'Last_Updated_Date');
Drop table Temp;
//Begin incremental
Incremental:
Load *
From $(vFileName)
(ooxml, embedded labels, table is Sheet1)
where Modified_Date> $(Last_Updated_Date);
Concatenate
load *
From
$(vQVDName)(qvd);
Store Incremental into $(vQVDName)(qvd);
Next;