Zu Hauptinhalt springen Zu ergänzendem Inhalt springen

Connect to data sources in load scripts

Data connections in the Data load editor let you save shortcuts to the data sources you commonly use: databases, local files, or remote files.

Data connections lists the connections you have saved in alphabetical order. You can use the search box to narrow the list down to connections with a certain name or type. You can access Data connections by clicking Data sources.

For more information, see Verbinden mit Datenquellen.

InformationshinweisYou can only see data connections that you own, or have been given rights to access. Wenden Sie sich bitte, falls erforderlich, an Ihren Qlik Sense-Systemadministrator, um Zugriff zu erhalten.

Creating a new data connection

Gehen Sie folgendermaßen vor:

  1. Click Data sources.

  2. Click Create new connection.
  3. Select the type of data source you want to create from the drop-down list.

    The settings dialog, specific for the type of data source you selected, opens.

  4. Enter the data source settings and click Create to create the data connection.

    The connection name will be appended with your user name and domain to ensure that it is unique.

The data connection is now created with you as the default owner. If you want other users to be able to use the connection in a server installation, you need to edit the access rights of the connection in the Qlik Management Console.

WarnhinweisThe settings of the connection you created will not be automatically updated if the data source settings are changed. This means you need to be careful about storing user names and passwords, especially if you change settings between integrated Windows security and database logins in the DSN.
InformationshinweisIf Create new connection is not displayed, it means you do not have access rights to add data connections. Wenden Sie sich bitte, falls erforderlich, an Ihren Qlik Sense-Systemadministrator, um Zugriff zu erhalten.

Deleting a data connection

Gehen Sie folgendermaßen vor:

  1. Click Data sources.

  2. Click Delete on the data connection you want to delete.
  3. Confirm that you want to delete the connection.

The data connection is now deleted.

InformationshinweisIf Delete is not displayed, it means you do not have access rights to delete the data connection. Wenden Sie sich bitte, falls erforderlich, an Ihren Qlik Sense-Systemadministrator, um Zugriff zu erhalten.

Editing a data connection

Gehen Sie folgendermaßen vor:

  1. Click Data sources.

  2. Under Data connections, select the space containing the data connection you want to edit.

  3. Click Edit on the data connection you want to edit.
  4. Edit the data connection details. Connection details are specific to the type of connection.

    You may need to provide the connection's credentials.

The data connection is now updated.

InformationshinweisIf you edit the name of a data connection, you also need to edit all existing references (lib://) to the connection in the script, if you want to continue referring to the same connection.
InformationshinweisIf Edit is not displayed, it means you do not have access rights to update the data connection. Please contact your Qlik Sense system administrator if required.

Inserting a connect string

Connect strings are required for most connections. Only folder and web file connections do not require connect strings.

InformationshinweisDiese Funktion ist in Qlik Sense SaaS nicht verfügbar.

Gehen Sie folgendermaßen vor:

  • Click Insert into script on the connection for which you want to insert a connect string.

A connect string for the selected data connection is inserted at the current position in the data load editor.

For more information, see Connect.

Selecting data from a data connection

If you want to select data from a data connection to load in your app do the following:

  1. Click Data sources.

  2. Create new connection linking to the data source (if the data connection does not already exist).
  3. Data Selection Select data from the connection.

Referring to a data connection in the script

You can use the data connection to refer to data sources in statements and functions in the script, typically where you want to refer to a file name with a path.

The syntax for referring to a file is 'lib://(connection_name)/(file_name_including_path)'

This example loads the file orders.csv from the location defined in the Folder data connection. This may be, for example, a folder that your administrator creates on the Qlik Sense server.

LOAD * FROM 'lib://DataSource/orders.csv';

This example loads the file Customers/cust.txt from the DataSource data connection folder. Customers is a sub-folder in the location defined in data connection.

LOAD * FROM 'lib://DataSource/Customers/cust.txt';

This example loads a table from the PublicData web file data connection, which contains the link to the actual URL.

LOAD * FROM 'lib://PublicData' (html, table is @1);

This example loads the table Sales_data from the DataSource database connection.

LIB CONNECT TO 'DataSource';
LOAD *;
SQL SELECT * FROM `Sales_data`;

Where is the data connection stored?

Connections are stored using the Qlik Sense Repository Service.You can manage data connections with the Qlik Management Console in a Qlik Sense server deployment. The Qlik Management Console allows you to delete data connections, set access rights and perform other system administration tasks.

WarnhinweisIn Qlik Sense Desktop, all connections are saved in the app without encryption. This includes possible details about user name, password, and file path that you have entered when creating the connection. This means that all these details may be available in plain text if you share the app with another user. You need to consider this while designing an app for sharing.

Weitere Informationen

Hat diese Seite Ihnen geholfen?

Wenn Sie Probleme mit dieser Seite oder ihren Inhalten feststellen – einen Tippfehler, einen fehlenden Schritt oder einen technischen Fehler –, teilen Sie uns bitte mit, wie wir uns verbessern können!