Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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.

1 Solution

Accepted Solutions
ramoncova06
Specialist III
Specialist III

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);

View solution in original post

4 Replies
srchilukoori
Specialist
Specialist

What is the file name format?

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

maxgro
MVP
MVP

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
Partner - Contributor III
Partner - Contributor III

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
Specialist III
Specialist III

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);