Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
IMPORTANT: Upcoming LEF Database Maintenance, Oct. 3rd - SEE DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

QVD Dictionary

Hi all,

I am looking for a code that allows me to create a table like the one below:

QVD NAME      FIELDS

QVD_1              Field_1

QVD_1              Field_2

QVD_2              Field_1

 

The QVDs are located in different folders in the server.

 

Any idea?

 

Much appreciated your hep,

 

Edi

1 Reply
Highlighted
Specialist II
Specialist II

Try this one:

Short:

for each vFile in FileList('C:\PATH\*.qvd')
     let vFileName = mid(vFile, index(vFile, '\', -1) + 1, 99);

     QvdFields:
     LOAD
          '$(vFileName)'         as [File Name],
          FieldName              as [Field Name]

     FROM [$(vFile)] (XmlSimple, Table is [QvdTableHeader/Fields/QvdFieldHeader]);
next

 

complete:

for each vFile in FileList('C:\PATH\*.qvd')
     let vFileName = mid(vFile, index(vFile, '\', -1) + 1, 99);

     QvdFields:
     LOAD
          1                      as FieldCount,
          '$(vFileName)'         as [File Name],
          FieldName              as [Field Name],
          BitOffset              as [Bit Offset],
          BitWidth               as [Bit Width],
          Bias                   as [Bias],
          NoOfSymbols            as [No Of Symbols],
          [NumberFormat/Type]    as Type,
          [NumberFormat/nDec]    as Dec,
          [NumberFormat/UseThou] as UseThou
     FROM [$(vFile)] (XmlSimple, Table is [QvdTableHeader/Fields/QvdFieldHeader]);

     QvdTableHeader:
     LOAD 
          1                      as QVDCount,
          '$(vFileName)'         as [File Name],
          QvBuildNo              as [QV Build No],
          CreatorDoc             as [QVD Creator],
          CreateUtcTime          as [Time Created],
          SourceFileSize         as [Source File Size],
          TableName              as [Table Name],
          RecordByteSize         as [Record Byte Size],
          NoOfRecords            as [Number Of Records]
     FROM [$(vFile)] (XmlSimple, Table is [QvdTableHeader]);
next

 

regards

tim