Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Open QVD or QVW file in R-Project

How can i open a qvd or qvw file from r-project to work on data mining?

2 Replies
Not applicable
Author

Hello

QViewer

easyqlik.com

Anonymous
Not applicable
Author

Hi Handry,

Here's an example:

  • [MeuProjeto2.qvw] need to extract information from a table contained in [MeuProjeto1.qvw]:

  • In [MeuProjeto2.qvw], the first line of the script, must be Binary statement:

Binary ;

Next, make a loop to catalog the tables in qvw to serve as a data source

For i = 0 to NoOfTables()-1

  Let vTableName = chr(39) & TableName($(i)) & Chr(39);

  Tables:

  Load $(vTableName) as TableName

  AutoGenerate 1;

Next;

  • Following, make a loop to extract the desired information storing them in QVD files.

For i = 0 to (NoOfRows('Tables')-1)

  LET vTable = '[' & Peek('TableName', $(i), 'Tables') & ']';

  LET vQVDName = Peek('TableName', $(i), 'Tables');

  // Tabela interesse: [SessionTaskAuditMaster]

  IF vTable = '[NomeTabelaDesejada]' THEN

        Store $(vTable) into $(vQVDName).QVD;

  END IF;

  Drop Table $(vTable);

NEXT

Drop Table Tables;

  • From there, with the QVD file layout, usually make the extraction as:

Directory;

Sales:

LOAD Field1 AS SalesDate,

   Field2 AS SalesMan,

    Field3 AS SalesAmount

FROM NomeTabelaDesejada.QVD(qvd);

Works perfectly! Hope this helps!

Evandro