Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Just have a look at FOR EACH ... NEXT in the HELP
There is a code sample for scanning all subfolders as well.
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')
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
Helpful