Skip to main content Skip to complementary content

Load script modifications

Qlik Cloud does not support the use of Windows file system paths in functions, statements, and variables. Instead, library connections, which are connection strings to data and script files, are used, for example, lib://DataFiles/myData.txt.

Limitations

Several statements, variables, and functions applicable to QlikView and Client-Managed Qlik Sense (in standard or legacy modes) cannot be used or have limitations in Qlik Cloud. Generally, these limitations are imposed on statements, variables, and functions that are associated with Windows file system paths.

Using unsupported statements in the data load script produces an error when the load script runs. Error messages can be found in the script log file. Using unsupported variables and functions does not produce error messages or log file entries. Instead, the function returns NULL.

There is no indication that a variable, statement, or function is unsupported when you are editing the data load script.

Applicability of variables, statements, and functions in Qlik Cloud

If you plan on re-using data load scripts from QlikView or client-managed Qlik Sense in Qlik Cloud, consult the following tables to see which variables, statements, and functions are supported and their requirements.

System variables

Variable Applicability Definition
Floppy

Not supported

Returns the drive letter of the first floppy drive found, normally a:.
CD

Not supported

Returns the drive letter of the first CD-ROM drive found. If no CD-ROM is found, then c: is returned.
QvPath

Not supported

Returns the browse string to the Qlik Sense executable.
QvRoot

Not supported

Returns the root directory of the Qlik Sense executable.
QvWorkPath

Not supported

Returns the browse string to the current Qlik Sense app.
QvWorkRoot

Not supported

Returns the root directory of the current Qlik Sense app.
WinPath

Not supported

Returns the browse string to Windows.
WinRoot

Not supported

Returns the root directory of Windows.
$(include=...) Supported input: Path using library connection The Include/Must_Include variable specifies a file that contains text that should be included in the script and evaluated as script code. It is not used to add data. You can store parts of your script code in a separate text file and reuse it in several apps. This is a user-defined variable.

Regular script statements

Statement Applicability Definition
Binary

Binary

Supported input: Path using library connection The binary statement is used for loading data from another app.
Connect Not supported The CONNECT statement is used to define Qlik Sense access to a general database through the OLE DB/ODBC interface. For ODBC, the data source first needs to be specified using the ODBC administrator.
Directory

Directory

Supported input: Path using library connection The Directory statement defines which directory to look in for data files in subsequent LOAD statements, until a new Directory statement is made.
Execute Not supported The Execute statement is used to run other programs while Qlik Sense is loading data. For example, to make conversions that are necessary.
LOAD from ...

Load

Supported input: Path using library connection The LOAD statement loads fields from a file, from data defined in the script, from a previously loaded table, from a web page, from the result of a subsequent SELECT statement or by generating data automatically.
Store into ...

Store

Supported input: Path using library connection The Store statement creates a QVD, Parquet, CSV, or TXT file.

Script control statements

Statement Supported input Returned output Definition

For each...

filelist mask/dirlist mask

For each..next

Library connection

Library connection

The filelist mask syntax produces a comma separated list of all files in the current directory matching the filelist mask. The dirlist mask syntax produces a comma separated list of all directories in the current directory matching the directory name mask.

File functions

Function Supported input Returned output Definition
Attribute()

Attribute

Library connection   Returns the value of the meta tags of different media files as text.
ConnectString()

ConnectString

  Library connection name Returns the active connect string for ODBC or OLE DB connections.
FileDir()

FileDir

 

Library connection The FileDir function returns a string containing the path to the directory of the table file currently being read.
FilePath()

FilePath

 

Library connection The FilePath function returns a string containing the full path to the table file currently being read.
FileSize()

FileSize

Library connection

  The FileSize function returns an integer containing the size in bytes of the file filename or, if no filename is specified, of the table file currently being read.
FileTime()

FileTime

Library connection

  The FileTime function returns a timestamp in UTC format of the last modification of a specified file. If a file is not specified, the function returns a timestamp in UTC of the last modification of the currently read table file.
GetFolderPath()

Not supported

Returned output: Absolute path

The GetFolderPath function returns the value of the Microsoft Windows SHGetFolderPath function. This function takes as input the name of a Microsoft Windows folder and returns the full path of the folder.
QvdCreateTime()

QvdCreateTime

Library connection   This script function returns the XML-header timestamp from a QVD file, if any is present, otherwise it returns NULL. In the timestamp, time is provided in UTC.
QvdFieldName()

QvdFieldName

Library connection   This script function returns the name of field number fieldno in a QVD file. If the field does not exist NULL is returned.
QvdNoOfFields()

QvdNoOfFields

Library connection   This script function returns the number of fields in a QVD file.
QvdNoOfRecords()

QvdNoOfRecords

Library connection   This script function returns the number of records currently in a QVD file.
QvdTableName()

QvdTableName

Library connection   This script function returns the name of the table stored in a QVD file.

System functions

Function Applicability Definition
DocumentPath()

Not supported

This function returns a string containing the full path to the current Qlik Sense app.
GetRegistryString()

 

Not supported

Returns the value of a named registry key with a given registry path. This function can be used in chart and script alike.

Visit the discussion forum at community.qlik.com

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!