Dieses Script exportiert das gesamte Datenmodell in den unter „exportDestination“ angegeben Ordner.

Als Dateiname wird der Name der Tabelle verwendet.

set exportType = ‚qvd‘;
oder  set exportType = ‚csv‘;

set exportDestination = ‚pathToStore/‘;

Beispiel für die Nutzung in Qlik Sense:

set DataSourcePath 	= 'lib://qvdImport';
set exportDestination 	= 'lib://qvdExport'; 			
set exportType 		= 'qvd';

$(Must_Include=$(incPath)exportData.qvs);

 

Gesamter Inhalt des Scripts:

/****************************************************************
* 	@Project:	qvdExport
*
*	@Author:	Thomas Lindackers
*	@Version:	2.1
*	
*	@last changes: 30.08.2017
*	
*****************************************************************/
Trace Export Tables @ $(ProjectName);
Trace ----------------------------------------------------------;
Trace exportType = $(exportType);
Trace exportDestination = $(exportDestination);

if exportType = 'qvd' Then
	FOR vCount = 0 to NoOfTables()-1
	     LET vTableName = TableName($(vCount));
	     STORE $(vTableName) INTO [$(exportDestination)$(vTableName).qvd] (qvd);
	
	NEXT vCount
elseif exportType = 'txt' Then
	FOR vCount = 0 to NoOfTables()-1
	     LET vTableName = TableName($(vCount));
	     STORE $(vTableName) INTO [$(exportDestination)$(vTableName).csv] (txt);
	NEXT vCount
endif;


if lower(dropTables) = 'true' then
	let vCount = NoOfTables()-1;
	FOR i = 0 to vCount 
	     LET vTableName = TableName(0);
		 Drop Table $(vTableName);
		 trace $(vTableName) dropped;
	NEXT i	     	
endif;