Skip to main content Skip to complementary content

Using Script editor

Prepare data for analytics apps directly in the Qlik Cloud Analytics hub using scripts. Scripts are task-specific, purpose-built applications for loading, transforming, and exporting data. You create and manage your scripts using Script editor.

Scripts allow you to load and transform data without needing an analytics app. The transformations can be reused to provide data to multiple apps. Scripts help you remove data preparation from the analytics app workflow unless users want to build and transform data themselves in their app.

In Script editor, you can create, preview, and run data scripts in the hub. You can use these scripts to store data in QVD files or other formats with the Store statement. These outputs can then be used by other users when creating analytics apps or when preparing data for AutoML. You can also create scripts that other users can use as templates for analytic app load scripts, rapidly speeding up the creation of apps using similar data models.

In Script editor, you can view the data sources used by the script as well as the files output by the script. You can access impact analysis and lineage information for your script as well as their inputs and outputs.

Scripts can be set up to reload on a predefined schedule or on-demand.

For an overview of scripts and Script editor, see Navigating Script editor.

A script open in Script editor

Script editor overiew, open to the Summary tab. There are two outputs displayed in the Outputs section and two inputs listed in the Inputs section.

Permissions

Your ability to create, view, and delete scripts is dependent on the type of space in which you are working and your permissions in that space.

Managing permissions in shared spaces

Managing permissions in managed spaces

Creating scripts

You can create scripts by clicking Add newScript in the hub. When you create a new script, you can specify the destination space of the script. By default, scripts are added to the current space or your personal space if no space is selected.

Once you have created a new script, you can develop the load script used to load data into the script and export files from the script. First, you add data sources to your script in the Editor section of Script editor. You can then use Qlik scripting functions to transform the loaded data. As you work, you can use Preview data to view the data that will be exported by your load scripts. Finally, add Store statements to store and export the loaded data.

Adding data sources to scripts

You can add data sources to your load script using Qlik scripting functions. You can use existing data files and connections. You can also add new data sources and connections. You can view existing data sources and add new data sources in Data sources.

Adding data from existing datasets

Click Add from data catalog to open the data catalog. You can add data from multiple datasets.

See: Loading data from the data catalog

Creating connections

Click Create new connection add a connection to your script.

See: Loading analytics data

Building the load script

Scripts use a data load syntax to connect to and retrieve data from your data sources when running the script.

In your load script, you specify the fields and tables to load. The script can be used to define space-aware connections, allowing you to load data from another space or make your load script look for data sources of a specific name in the current space. For more on space-aware connections, see Referring to a data connection in the script.

You can then manipulate the loaded data with functions in the load script. Script editor provides you with a broad set of tools for loading and transforming app data. You can perform operations such as:

  • Calculating new values

  • Translating coded values

  • Aggregating values

  • Joining or concatenating tables

  • Validating data

To learn more about creating load scripts, see:

All scripts include a default locale and regional settings based on the selections in your profile. For information on changing these settings, see Modifying regional settings for apps and scripts.

Previewing data

You can preview data in Editor. This allows you to do a partial load without loading and exporting all the data. You can ignore Store statements and define how many rows of data to preview for each table. To preview your data, click Preview data.

For more information on previewing data, see Previewing data in Script editor.

Exporting data

You can export data using Store statements in your script. You can add them manually in the script or click Insert Store statement in DataFiles to open Insert Store statement for assisted statement creation. To learn more about storing data, see Storing data with Script editor.

To run your script and export, click Export data.

Script limitations

Scripts have the following limitations

  • Unlike apps, scripts do not keep any data that is loaded in the script. Once the session is done, the data is removed. For example, if you previewed data and then closed the script, next time you opened the script there you would need to click Preview data again to generate a new preview.

  • Partial loads are not supported for scripts.

  • Loading scripts with binary statements is not supported. As scripts do not store the loaded data in the script, loading data from a script with a binary statement results in empty tables.

  • Scripts do not support section access.

  • Previewing the data (without Use Store statement turned on) does not count as a reload for reload information.

  • Exported scripts uploaded into Qlik Sense Enterprise on Cloud Services, Qlik Sense Desktop, or Qlik Sense Mobile will display as apps without data.

  • Shared space members with Can manage permission can see the Published copies tab in Overview but cannot see published scripts. If they have Can publish permission, they can see their own scripts.

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!