Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Incremental load

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.

Image result

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.

12 Replies
Not applicable
Author

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

vinieme12
Champion III
Champion III

if all your QVD's are in a single folder then just the below will do

LOAD *

FROM

[Fullpath\*.qvd]

(QVD);

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Anonymous
Not applicable
Author

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;