9 Replies Latest reply: Sep 16, 2011 4:06 PM by reachsainow RSS

    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

       

       

        • Re: How to read the syntax of qvds please?
          Chris Cammers

          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
          
          
          • 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.