Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to create a updated qvd

Hi All,

I have created I qvw app to generate period wise qvds, it is generating as I want, however now I want to perform  an incremental load to this means

today I have generated qvd for the period 8 , when I will run this application tomorrow the application should generate only last period with updated data [only 8 period ]. it should not generate previous period qvds.

PFA. for sample data.

6 Replies
padmanabhan_ram
Creator II
Creator II

Hi,

when you perform the full load make sure to write a "increment.qvd" which will store the last refresh time.

Use the last refresh time in the increment load i.e.

load *

from table where date_field_in_the_table >=last refresh time and date_field_in_the_table < current_execution_time;

Hope this helps.

Regards,

Padmanabhan

malini_qlikview
Creator II
Creator II

Hi,

Try this,

When you perform the initial load store the max updated date (the Max date from period 😎 in a variable and perform an incremental load from the next reload for the latest period.

Not applicable
Author

Thanks Padmanabhan,

yes your correct, however what I want I am generating the periods at first step for whole amount of data, for the next reload I want to update the latest period qvd only I don't want to run hole loop.

Not applicable
Author

Thanks Malini Chandrasekar

padmanabhan_ram
Creator II
Creator II

Hi John,

you can make use of this script

LET vScriptStart           = timestamp(now() - (Now()-GMT()), 'YYYY-MM-DD hh:mm:ss');  


[Increment]:
LOAD * INLINE [
ReloadTimeStamp
'$(vScriptStart)'
]
;

whenever you perform the incremental load use the time stamp that is stored in the reload time stamp.


Thanks,

Padmanabhan

Gabriel
Partner - Specialist III
Partner - Specialist III

Hi,

You have several options to add new data to your qvd.

You can create in LastModifiedDate variable , ask database guys to give you a field which you can use to determine new , deleted or modified data, then you can use this field in your WHERE clause.

Also,

In your attached qvw file tab Main 2 from line 121 replace with this

Line 121       

/*

Here you have to check if the same qvs file for the same period exists and

if yes concatenate the new table to the existing qvd file. But only concatenate

new data

*/      

IF  NOT IsNull([ ..\table_$(y)_$(p).qvd]) THEN

    Concatenate(table_$(y)_$(p))

    LOAD *

     FROM ..\table_$(y)_$(p).qvd (qvd)

     WHERE NOT Exists (DataID)

     ;

ELSE

        STORE table_$(y)_$(p) into ..\table_$(y)_$(p).qvd (qvd);

ENDIF