Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

vijetasharma
Valued Contributor

Incremental load in qvd's

Hi everyone,

I am facing problem in incremental load within qvd's,

my scenario is first time i am doing full load but in next month i want to load only new records and last six months data among which some of the old records are updated how should i do?

3 Replies
MVP
MVP

Re: Incremental load in qvd's

in online help search for incremental

Using qvd file for incremental load, case 3, insert and update (no delete)

other useful resources

Incremental Load

Incremental Load.docx

vijetasharma
Valued Contributor

Re: Incremental load in qvd's

My script is,

SET vExecTime=0;

SET v6MonthsBack=0;

t1:

LOAD LastModifiedDate

FROM D:\Qvds\cnt.qvd(qvd) ;

LET vExecTime=Peek('LastModifiedDate',0,'t1');

LET v6MonthsBack=AddMonths('$(vExecTime)',-6);

Table1:

LOAD Max(LastModifiedDate) as MDate from D:\Qvds\cnt.qvd

Where LastModifiedDate < $(v6MonthsBack);

concatenate

SQL select * from dbo.country_info where LastModifiedDate > $(v6MonthsBack) and LastModifiedDate < $(vExecTime) ;

STORE Table1 into D:\Qvds\cnt.qvd(qvd);

It's giving me an error

Cannot open file 'D:\Qvds\cnt.qvd

Where LastModifiedDate < 7/3/2013' The filename, directory name, or volume label syntax is incorrect.

Table1:

LOAD Max(LastModifiedDate) as MDate from D:\Qvds\cnt.qvd

Where LastModifiedDate < 7/3/2013 what's this mean?

Re: Incremental load in qvd's

I think there is a space missing before (qvd)

My script is,

SET vExecTime=0;

SET v6MonthsBack=0;

t1:

LOAD LastModifiedDate

FROM D:\Qvds\cnt.qvd (qvd) ;

LET vExecTime=Peek('LastModifiedDate',0,'t1');

LET v6MonthsBack=AddMonths('$(vExecTime)',-6);

Table1:

LOAD Max(LastModifiedDate) as MDate from D:\Qvds\cnt.qvd

Where LastModifiedDate < $(v6MonthsBack);

concatenate

SQL select * from dbo.country_info where LastModifiedDate > $(v6MonthsBack) and LastModifiedDate < $(vExecTime) ;

STORE Table1 into D:\Qvds\cnt.qvd (qvd);