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

Incremental load issue

Hi everyone. 

I have an issue with incremental load. The script that I used to perform this load looks like this.

 

If IsNull('History.qvd') then

Set vLoadType = 'Full';
Set vDate = 0;

Else

Set vLoadType = 'Incremental';
Set vDate = Num(Today());

End If

LoadTable:
Load *,
     Num(Date) as Period_FK
From Source.qvd(qvd)
Where Num(SourceDate) >= $(vDate);

Switch '$(vLoadType)'

        Case 'Full'

        Store LoadTable into LoadTable.qvd;
        Drop Table LoadTable;

        Case 'Incremental'

        Concatenate (LoadTable)

        Load *
        From Source.qvd (qvd)
        Where not Exists(Period_FK);

        Store LoadTable into LoadTable.qvd;
        Drop Table LoadTable;

End Switch

 

Everything OK with "Full" load. I got all periods with relevant amount of rows.Like this


full.png

 

 

 

 

 

 

 

 

 

 

But in case of Incremental load I suppose to see all previous data with new row for today date. Like this

full2.png

But instead I got only today date an 1 row for each previous periods. Like this.

inc.png 

Why is it happened?  How tho get relevant data in case of incremental load?

Labels (1)
0 Replies