Skip to content

Instantly share code, notes, and snippets.

@bitmetric-bv
bitmetric-bv / AutoAutoNumber.qvs
Last active March 8, 2022 19:58
Since Qlik Sense June 2018, AutoNumber is available as a script statement (and not only as a function). This subroutine automatically Autonumbers all keys in your data model.
SUB AutoAutoNumber
// Loop all tables in the data model, and
// create a list of all tables/fields
FOR AutoAutoNumber.t = 0 TO NoOfTables() - 1
AutoAutoNumber.TableName = TableName($(AutoAutoNumber.t));
// Loop all fields for single table
FOR AutoAutoNumber.f = 1 TO NoOfFields('$(AutoAutoNumber.TableName)')
@bitmetric-bv
bitmetric-bv / backup_qliksense.ps1
Last active March 8, 2022 20:03
Backup Qlik Sense Repository, Log Database and Shared Persistence folder
#requires -version 4
<#
.SYNOPSIS
Backup the Qlik Sense Repository and Log database, as well as the Qlik Share
.DESCRIPTION
Backs up the Qlik Sense Repository (QSR) and centralized logging (QLogs)
databases from Postgres, as well as the contents of the Qlik Sendse Shared
Persistence folder (ArchivedLogs, Apps, StaticContent and CustomData folders).
.NOTES
Version: 1.2
@bitmetric-bv
bitmetric-bv / create_sense_backup_user.sql
Last active March 8, 2022 20:03
Create read-only backup user for Qlik Sense repository and logging database
/*
Description
-----------
This script creates a read-only Postgres user with access
to the Qlik Sense QSR and QLogs databases. You can use this
user to perform backups of your Qlik Sense Repository and
Centralized Logging databases.
@bitmetric-bv
bitmetric-bv / export_qvf.ps1
Last active March 8, 2022 20:03
Export QVFs without data from Qlik Sense server, using PowerShell and qlik-cli
#requires -version 4
<#
.SYNOPSIS
Export QVF files from Qlik Sense Enterprise server without data, grouped by user and stream.
.DESCRIPTION
Export QVF files from Qlik Sense Enterprise server without data, grouped by user and stream.
The time period for which to keep backups can be configured (standard is 30 days).
Files are stored in [username]\[stream name] format. If the QVF is not published, the stream
name 'Personal' is used.
.NOTES
@bitmetric-bv
bitmetric-bv / Qlik_Sense_localization_settings_en-US.qvs
Created March 1, 2019 16:02
Qlik Sense en-US localization settings
SET ThousandSep = ',';
SET DecimalSep = '.';
SET MoneyThousandSep = ',';
SET MoneyDecimalSep = '.';
SET MoneyFormat = '$#,##0.00;-$#,##0.00';
SET TimeFormat = 'h:mm:ss TT';
SET DateFormat = 'M/D/YYYY';
SET TimestampFormat = 'M/D/YYYY h:mm:ss[.fff] TT';
SET FirstWeekDay = 6;
SET BrokenWeeks = 1;