Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

How do I know what kind of data/database is used in qvds please?

Hello All,

When I open the qvw that has the script to generate qvd (developed by other developer), how would I know what tables and what database (whether the data used is a flat file, or sql server table or, AS400, or...). Please check and advise/explain on the syntax I see when I open the qvw. Thanks Much

// CONNECT32 TO qlik2 (UserID="Userid" Password="Password");

LET

FileDate = = date(today()-1,'YYYYMMDD');

ShipDaily_Raw:

LOAD
  *
     ;
SQL SELECT *
FROM TESTAPP.QLIKFILES.DLYSHPPF;

//SQL SELECT *
//FROM TESTAPP.QLIKBACKUP.DLYSHPPF;  //backup


store ShipDaily_Raw into DataSources\ShipDaily_Raw_$(FileDate).qvd;

//ODBC

Tags (3)
9 Replies
chriscammers
Contributor III

Re: How to read the syntax of qvds please?

I don't think qvd's have the data you are looking for but if you want to pull the xml headers you can get the table information and field information by telling the table file wizard that the file is an xml file. You'll end up with some code that will look something like the following.

There is lots of useful table information but the source code used to create it would be found in the original qvw

// Start of [Fruit.qvd] LOAD statements

QvdFieldHeader:

LOAD FieldName,

    BitOffset,

    BitWidth,

    Bias,

    NoOfSymbols,

    Offset,

    Length,

    [NumberFormat/Type] as Type,

    [NumberFormat/nDec] as nDec,

    [NumberFormat/UseThou] as UseThou,

    %Key_QvdTableHeader_B94FCCAC68ED3E20    // Key to parent table: QvdTableHeader

FROM Fruit.qvd (XmlSimple, Table is [QvdTableHeader/Fields/QvdFieldHeader]);

QvdTableHeader:

LOAD QvBuildNo,

    CreateUtcTime,

    SourceFileSize,

    TableName,

    RecordByteSize,

    NoOfRecords,

    Offset,

    Length,

    %Key_QvdTableHeader_B94FCCAC68ED3E20    // Key for this table: QvdTableHeader

FROM Fruit.qvd (XmlSimple, Table is [QvdTableHeader]);

// End of [Fruit.qvd] LOAD statements

Not applicable

Re: How to read the syntax of qvds please?

To create a QVD file you use the store command.

test:

Select * from mydatabase;

store * from test into test.qvd;  //This creates the qvd file.

The data lineage is not stored in the QVD.  That information can be captured via metadata however.

Not applicable

How do I know what kind of data/database is used in qvds please?

Thanks. Please check the syntax i got from the qvw and advise on the same

Not applicable

Re: How to read the syntax of qvds please?

Thanks. Please check the syntax i got from the qvw and advise on the same

chriscammers
Contributor III

Re: How to read the syntax of qvds please?

Did you edit your original post? I'm totally confused because there is stuff there that I did not see originally. Oh Well

There is nothing happening in this script

Pulling all rows and fields from TESTAPP.QLIKFILES.DLYSHPP and sending that table into a qvw

the file date ends up being yesterday but it is not used anywhere.

Not applicable

Re: How to read the syntax of qvds please?

// CONNECT32 TO qlik2 (UserID="Userid" Password="Password");

Line above forces connection to a 32 bit dirver

This created a date value

LET FileDate = = date(today()-1,'YYYYMMDD');

This names the table

ShipDaily_Raw:

This is extracting the file.  no real reason to use load statement if no transformation is taking place.

LOAD
  *
     ; This SQL Select Statement is pulling from a database via ODBD connection listed above.
SQL SELECT *
FROM TESTAPP.QLIKFILES.DLYSHPPF;

//SQL SELECT *
//FROM TESTAPP.QLIKBACKUP.DLYSHPPF;  //backup

This is storing the qvd file.


store ShipDaily_Raw into DataSources\ShipDaily_Raw_$(FileDate).qvd;

//ODBC

Not applicable

How do I know what kind of data/database is used in qvds please?

Thanks Much for being so clear. Is it possible to know what kind of databse, whether the table is from a SQL database or, AS400, or Oracle Database, etc?

Not applicable

Re: How to read the syntax of qvds please?

Thanks Much for being so clear. Is it possible to know what kind of databse, whether the table is from a SQL database or, AS400, or Oracle Database, etc?

Not applicable

Re: How to read the syntax of qvds please?

Yes. I did edit the post, since I felt I wasn't clear and the script would help. Thanks for replying.

  Is it possible to know what kind of databse, whether the table used  is from a SQL database or, AS400, or Oracle Database, etc?

Community Browser