Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count of records

Hi,

I'm trying to list the name of table and number of records from qvds.

And I got it right for one qvd but unable to do it when I have multiple qvds.

Can someone suggest me a logic or sample code for this.

Note: There may be multiple qvds and all of them in different locations.

Regards,

Sachin

13 Replies
swuehl
MVP
MVP

Just have a look at FOR EACH ... NEXT in the HELP

http://help.qlik.com/de-DE/qlikview/12.0/Subsystems/Client/Content/Scripting/ScriptControlStatements... each

There is a code sample for scanning all subfolders as well.

sunny_talwar

Something like this using the help section as Stefan pointed out:

SUB DoDir(Root)

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

  Let vQVDName = QvdTableName('$(File)');

  Let vNumRows = QvdNoOfRecords('$(File)');

  [Rec Count]:

  LOAD *,

    RowNo() as Key;

  LOAD * INLINE [

      QVD Table Name, No Of Records

      $(vQVDName), $(vNumRows)

  ];

  NEXT File

  FOR Each Dir in DirList(Root&'\*')

  Call DoDir(Dir)

  NEXT Dir

END SUB

CALL DoDir ('C:\Users\sunny.a.talwar\Downloads\Test')

Tyler_Waterfall
Employee
Employee

You could also use the Governance Dashboard - that will load all the QVDs in specific folders (and subfolders) and present metadata about QVDs: table name, fields, rows, total values, cardinality, etc.

The 2.0 Governance Dashboard (in beta now) only requires you to save the app and update the configuration page to point to your parent folder(s) where the QVDs are.

You can find the app and some Q&A here: QlikView Governance Dashboard 2.0 App Beta

Not applicable
Author

Helpful