Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
manu1512
Creator
Creator

Incremental script

Can anyone help me in understanding following incremental  load script.

SET vLastExecTime = 0; // resetting vLastExecTime

LET vLastExecTime = timestamp(if(isnull(QvdCreateTime('$(vQVDPath)ReloadHistory.QVD')), 0, ConvertToLocalTime(QvdCreateTime('$(vQVDPath)ReloadHistory.QVD'), 'GMT', 1)), 'YYYY-MM-DD hh:mm:ss');

LET vExecTime = timestamp(UTC(), 'YYYY-MM-DD hh:mm:ss');

LET vTodaysDate     = today();

//For the 1st reload, this section will be skipped.

LET FirstReload = isnull(QvdCreateTime('$(vQVDPath)ReloadHistory.QVD'));

if Not $(FirstReload) then

// Read Reload History Data

ReloadHistory:

Load

No,

[Last Reload Ended],

[Reload Started]

FROM $(vQVDPath)ReloadHistory.qvd (qvd);

end if

ReloadHistory:

LOAD

RowNo() as No,

'$(vLastExecTime)' as [Last Reload Ended],

'$(vExecTime)' as [Reload Started]

Autogenerate(1);

STORE * FROM ReloadHistory INTO $(vQVDPath)ReloadHistory.qvd;

Regards

Manu

0 Replies