An updated Version Control tab for Qlik Sense & QlikView

April 29, 2020

This updated snippet (see original post from 2018) is available on GitHub, and included in this post.

The main benefits of this script are that it requires a single row addition per log, with no manual increment of the version number, and the version control information can be surfaced by the engine either to the UI or via the APIs.

This assumes a HidePrefix of %.

/* 
********************* INFORMATION *********************

CREATED BY:     withdave
CREATED DATE:   19/03/2020
PURPOSE:        RAW Extractor for Teradata T3 datamarts

********************* CHANGE LOG *********************
*/

// Update this version control table after each edit. Avoid using the ; delimiter in your change log
Island_VersionControl:
LOAD
	*
INLINE [
%Ver_Version; %Ver_Date; %Ver_Author; %Ver_Change
1; 19/03/2020; withdave; Initial version
2; 21/04/2020; withdave; Changed store file names and added mapping for region from contact
3; 28/04/2020; withdave; Added transformed contact file
] (delimiter is ';');


// Do not edit the section below as this loads and sets the version variable in the app using the table above
// Identify the maximum version
Temp_Version:
LOAD
	Max(%Ver_Version) AS Temp_Max_Version
RESIDENT Island_VersionControl;

// Set the version variable
LET vVersion = Peek('Temp_Max_Version',0,'Temp_Version');

// Drop the temporary table
DROP TABLE Temp_Version;

Profile picture

From Dave, who writes to learn things. Thoughts and views are his own.

© 2024, withdave.