Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

double7671
Contributor

syntax to load new qvd file only?

I have weekly sales file. one file per week. Every week will have new sales file. they all are qvd format.

What syntax I may use to just load the new created file weekly? Thanks.

Tags (1)
1 Solution

Accepted Solutions
ramoncova06
Valued Contributor III

Re: syntax to load new qvd file only?

check the partial reload in QV help

or in another case use a binary load while concatenating the new file

if you use a standard format for the weekly file naming it could be like

binary test.qvw // has to be first line of the whole script

let vWeekFormat = date(Today(),'YYYYMMDD');

concatenate(Sales)

Load

*

from ../../Sales_'$(vWeekFormat)'.qvd(qvd);

4 Replies
srchilukoori
Valued Contributor

Re: syntax to load new qvd file only?

What is the file name format?

You can use 'filetime()' function in the script.

MVP
MVP

Re: syntax to load new qvd file only?

from QlikView online help

QvdCreateTime(filename)

Returns the XML-header time stamp from a QVD file if any (otherwise NULL).

The filename is the name of a QVD file, if necessary including path.

Examples:

QvdCreateTime('MyFile.qvd')

QvdCreateTime('C:\MyDir\MyFile.qvd')

pavendhan
New Contributor II

Re: syntax to load new qvd file only?

Try this

T1:

LOAD 

FilePath() as FilePath

,FileTime() as Filetime

FROM (qvd) ;

T2:

First 1

Load FilePath as File

Resident T1 Order by Filetime desc

; /// This variable will return Latest file info 

Let vFile = Peek('File',0,'T2');

Drop Tables T1,T2;

/// Pass this variable to Qvd load

LatestQVD:

Load * 

From

$(vFile)(qvd);

ramoncova06
Valued Contributor III

Re: syntax to load new qvd file only?

check the partial reload in QV help

or in another case use a binary load while concatenating the new file

if you use a standard format for the weekly file naming it could be like

binary test.qvw // has to be first line of the whole script

let vWeekFormat = date(Today(),'YYYYMMDD');

concatenate(Sales)

Load

*

from ../../Sales_'$(vWeekFormat)'.qvd(qvd);

Community Browser