Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Incremental Load for many Quarters

Hello All,

We have Quarterly data in our Application. As of now. I'm loading 1st quarter data from Process_Cycle_Id 12. We are using SQL database. I am following standard procedure to fetch the next quarter means Process_Cycle_Id 15 using Incremental Load but we already have 5 more Ids like 18,21,24,27,30 and more will be getting added in future. So I want a For Loop that will automatically append and fetch the data for 15,18,21, and so on...

Also, let me know. the changes to make in Tear 01 ie. Extract Application.

Note: Process_Cycle_Id is the only means to fetch the data. Effective Date and Expiry Date of Policies are of no use in my application at least not for Incremental Load.

I'm doing like below.;

Incremental_Tbl:

Load

Proc_Cyc_id ,

Proc_Cyc_id & '-' & IdCount as %Main_Key,

AccountName,

PolicyNumber,

From[$(vSrcPath1)MainTable_12.qvd];

Concatenate

Load

Proc_Cyc_id,

Proc_Cyc_id & '-' & IdCount as %Main_Key,

AccountName

PolicyNumber

From[$(vSrcPath1)MainTable_15.qvd]

Where not exists (%Main_Key, Proc_Cyc_id & '-' & IdCount);

Its working fine but how. to append for 18,21,24 with For loop and also suggest on ex-traction of data.

1 Reply
maxgro
MVP
MVP

try

Incremental_Tbl:

Load

     Proc_Cyc_id ,

     Proc_Cyc_id & '-' & IdCount as %Main_Key,

     AccountName,

     PolicyNumber

From [$(vSrcPath1)MainTable_12.qvd] (qvd);

for i=15 to 24 step 3

     Concatenate (Incremental_Tbl)

     Load

          Proc_Cyc_id,

          Proc_Cyc_id & '-' & IdCount as %Main_Key,

          AccountName,

          PolicyNumber

     From [$(vSrcPath1)MainTable_$(i).qvd] (qvd)

     Where not exists (%Main_Key, Proc_Cyc_id & '-' & IdCount);

next;