Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

qvd loading

Hi All,

I need to load qvd with latest loaded .

i am executing the below script

LOAD *

   FROM [..\02_QvdGenerators\QvdGenerated\Qvd_By_Month\.qvd](qvd)

  

   where QVDCreateTime =Max(QVDCreateTime);

i am getting correct time of qvd creation,

I need to pull qvd with latest creation.

Thnanks

1 Solution

Accepted Solutions
settu_periasamy
Master III
Master III

Hi Rgv,

Try this code. This will take Latest QVD and Load it.

Let vQVDFolderPath='C:\Users\SP\Documents\QVD';  //Just Change your QVDPath

For Each File in FileList(vQVDFolderPath& '\*.qvd')

  QVDDetails:

     First 1

     Load  FileName() as QVDFileName,

        QvdCreateTime('$(File)') as QVDCreateTime,

        SubField(SubField('$(File)','\',-1),'.',1) as QVDTableName

     From [$(File)] (qvd);

Next File

NoConcatenate

QVDOrder:

LOAD QVDFileName,QVDCreateTime,QVDTableName Resident QVDDetails Order by QVDCreateTime;

Let vQVDLoadFile=Peek('QVDFileName',-1);

Let vQVDTableName=Peek('QVDTableName',-1);

DROP Table QVDOrder;

[$(vQVDTableName)]:

LOAD * From [$(vQVDFolderPath)\$(vQVDLoadFile)](qvd);

View solution in original post

6 Replies
settu_periasamy
Master III
Master III

Hi,

Try this..

If you have the Field QVDCreateTime in your QVD, you can create the variable for Maximum create Time. Like

MaxCreateTime:

Load Max(QVDCreateTime) as MaxQVDCreatetime From QVDSource;

vMaxQVDCreateTime=Peek('MaxQVDCreateTime');

Drop Table MaxCreateTime;

Load * FROM QVDSource where QVDCreateTime>='$(vMaxQVDCreateTime)';

Anonymous
Not applicable
Author

Hi

i need to load the qvd which has maxCreationtime .

i think i have problemm in the extension. i am using

OAD *

   FROM [..\02_QvdGenerators\QvdGenerated\Qvd_By_Month\.qvd](qvd).

Is it the correct way

settu_periasamy
Master III
Master III

Can you clarify, Do you need which qvd is latest based on QVDCreation Time?,

if so, check your previous thread Incremental load with qvd's

Or You want to load the data based on existing QVDCreationTime Field?

It would be good, if you give more specific.

Anonymous
Not applicable
Author

I need qvd's loaded latest .

My qvd name format is Jan 2015 etc..

for example jan 2015 is executed at 20/12/2015 10:15:22a.m

i want to load jan 2015 qvd as of now it is latest

settu_periasamy
Master III
Master III

Hi Rgv,

Try this code. This will take Latest QVD and Load it.

Let vQVDFolderPath='C:\Users\SP\Documents\QVD';  //Just Change your QVDPath

For Each File in FileList(vQVDFolderPath& '\*.qvd')

  QVDDetails:

     First 1

     Load  FileName() as QVDFileName,

        QvdCreateTime('$(File)') as QVDCreateTime,

        SubField(SubField('$(File)','\',-1),'.',1) as QVDTableName

     From [$(File)] (qvd);

Next File

NoConcatenate

QVDOrder:

LOAD QVDFileName,QVDCreateTime,QVDTableName Resident QVDDetails Order by QVDCreateTime;

Let vQVDLoadFile=Peek('QVDFileName',-1);

Let vQVDTableName=Peek('QVDTableName',-1);

DROP Table QVDOrder;

[$(vQVDTableName)]:

LOAD * From [$(vQVDFolderPath)\$(vQVDLoadFile)](qvd);

Anonymous
Not applicable
Author

Thank alot  settu !! Its working