Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
qliktech_uk
Contributor III
Contributor III

QVD Load Stats

Hi,

I am using the code below to get the stats, it comes up as syntax error, I am unable to figure out why, your help is much appreciated.

SUB Stats;

LET vEndTime = Now();

LET vRecords = NoOfRows('$(vTable)');

LET vFields = NoOfFields('$(vTable)');

Statistics:

LOAD * From  Statistics.QVD; //where TableName <> '$(vTable)';

Join (Statistics)

LOAD

DISTINCT

     ‘$(vTable)’ AS TableName, 

     ‘$(vStartTime)’ AS StartTime,

     ‘$(vEndTime)’ AS EndTime,

      '$(vRecords)' AS Records,

       '$(vFields)' as Fields

     RESIDENT Statistics;

     STORE Statistics INTO Statistics.qvd;

     DROP TABLE Statistics;

End SUB ;

12 Replies
felipedl
Partner - Specialist III
Partner - Specialist III

If you only need the stats for each QVD you have,

I've done a quick example on how to do it if you don't have all the tables loads preaviously.

You just have to change the directory of the folder, and it will get all the QVDs on that particular folder and get the stats.

If you don't put anyhtin in the vDirFile variable, it will get the QVDs from the same path as the QVW.

Felipe.

qliktech_uk
Contributor III
Contributor III
Author

Thanks so much Felipe.

felipedl
Partner - Specialist III
Partner - Specialist III

No problem, glad to help