Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

consenit
Contributor II

Export entire Qlik Sense data model to Excel

Hello folks.

We have a Qlik Sense application in QVF format and would like to export all the tables in the data model. We tried creating one table objects per table but the key fields are hidden with SET HidePrefix ='%' in the script and therefore not selectable. Obviously we cannot reload the application because the original data source is not available.

Is there a way to extract all tables from the QFV alone?

Thanks in advance.

Kind regards,

Ernesto.  

1 Solution

Accepted Solutions
avkeep01
Valued Contributor

Re: Export entire Qlik Sense data model to Excel


Hi Ernesto, you could use this script in a new qvf

BINARY [Location/application.qvf];

/// STORE in different folders

// Location datamart

SET vDatamart = \\02 - Content\06 - Models\Datamarts;

FOR i = 0 TO NUM(NOOFTABLES()-1);


IF TABLENAME($(i)) = 'Calender' THEN

// Don't store the calendar
LET i= $(i)+1;

ELSE 

LET vTable = TABLENAME($(i));

STORE '$(vTable)' INTO '$(vDatamart)\$(vTable).qvd' (qvd);

END IF 



NEXT i

3 Replies
avkeep01
Valued Contributor

Re: Export entire Qlik Sense data model to Excel


Hi Ernesto, you could use this script in a new qvf

BINARY [Location/application.qvf];

/// STORE in different folders

// Location datamart

SET vDatamart = \\02 - Content\06 - Models\Datamarts;

FOR i = 0 TO NUM(NOOFTABLES()-1);


IF TABLENAME($(i)) = 'Calender' THEN

// Don't store the calendar
LET i= $(i)+1;

ELSE 

LET vTable = TABLENAME($(i));

STORE '$(vTable)' INTO '$(vDatamart)\$(vTable).qvd' (qvd);

END IF 



NEXT i

MVP
MVP

Re: Export entire Qlik Sense data model to Excel

Yes there is.

You can do a BINARY load of the existing Qlik Sense application in a new Qlik Sense application's load script. Then you add one STORE statement for every table in the data model.

This can be done dynamically as you have special meta-data tables in Qlik that has the names of the tables in memory. This system table is called $Table. System fields ‒ Qlik Sense

consenit
Contributor II

Re: Export entire Qlik Sense data model to Excel

Thank you very much for you response, that worked like a charm.

Kind regards,

Ernesto.