Export data to QVDs
Sometimes it makes more sense to use a QVD to load your data from than the source. This might be for testing, performance or development reasons or maybe just because the day ends with a ‘y’.
This script is an example of how to loop through all of the tables in a data model and create a series of QVDs. There is an optional variable (vDebug) you can use to trigger whether this works.
The script should be placed after all the other processing e.g. on the last Tab or Section.
/* Export all tables to QVD To ensure all tables are extracted, this workflow needs to be the last step processed (i.e. placed on the last tab) Note comments re Qlik Sense syntax v QlikView syntax */ // use of debug variable is optional // Following line is optional (if commented out then comment out the End If; line too) If vDebug = 1 Then // Loop through each of the tables and use store to generate output For i = 0 to NoOfTables () - 1 Let d = TableName ( i ); // Uncomment one of the folloing blocks based on whether QlikView or QLik Sense being used // Store [$(d)] into [c:\temp\$(d)].qvd (qvd); // QlikView syntax (remember to update the path) // Store [$(d)] into 'lib://Extracts/Data/$(d).qvd' (qvd); // Qlik Sense syntax (remember to update the path) Next; End If;