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

Compare qvd's.

Is there a way to compare qvds?  In other words I have Groups_US and Groups_UK and want to see if they have the same fields and if not, what fields are different.  Thanks.

3 Replies
rbecher
MVP
MVP

Hi,

you can load the meta data from the QVD's XML header as a XML source into a QlikView table and display the differences then.

- Ralf

Astrato.io Head of R&D
Not applicable
Author

Hi Ralf

I followed the below steps to achieve the above but got stuck in below point. Could you please helpme out to proceed further?

Edit Script --> Table files --> Select the QVD --> File Type as Xml --> ???(What to be done after this?)

Also my situation is different here. Instead of comparing which fields are missing in the two similar QVD's I would like to know which records are missing in the two similar QVD's.

Please reply me back in your convenient time!

Thanks,
Attitude

rbecher
MVP
MVP

To load the table and field header of the QVD you can use this code (from TIQView):

QvdFieldHeader:

LOAD Left(FileName(), len(FileName())-4) as QVDName, RecNo() as FieldNo, *;

LOAD FieldName,

     BitOffset,

     BitWidth,

     Bias,

     NoOfSymbols,

     Offset,

     Length,

     [NumberFormat/Type] as Type,

     [NumberFormat/nDec] as nDec,

     [NumberFormat/UseThou] as UseThou,

     [NumberFormat/Fmt] as Fmt,

     [NumberFormat/Dec] as Dec

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

   

QvdTableHeader:

LOAD Left(FileName(), len(FileName())-4) as QVDName, *;

LOAD QvBuildNo,

     CreateUtcTime,

     SourceFileSize,

     TableName,

     RecordByteSize,

     NoOfRecords,

     Offset as HeaderOffset,

     Length as HeaderLength

FROM $(vQvdFile) (XmlSimple, Table is [QvdTableHeader]);

How you will compare records? Do you have a primary key value to check existence of records?

- Ralf

Astrato.io Head of R&D