This section provides you with information on how to connect Qlik Sense desktop tool to Exasol using ODBC connection.
The following environment is used as an example:
- Qlik Sense for Windows
- Windows Operation System
- An Exasol environment that is accessible from your Windows environment.
- A system ODBC connection which points to the Exasol instance. For details about how to configure the ODBC driver, see Using the ODBC Driver. Refer to the example ODBC connection image below:
- Qlik Sense for Windows installed. For more information about download and installation instruction, see Qlik.
- A running Exasol SaaS database. For more information, see Manage Databases and Clusters.
- The IP address of the client or server where the tool is running must be listed in the allowed IP address list. For more information, see Network Security.
Get Drivers and Connection Details
Before you can proceed with connecting to your database from a tool, you need to download the latest Exasol ODBC driver and get the connection string. Follow these steps to get your connection details:
- Click Databases in the web console to open the Databases page.
- Click on the cluster you want to connect to and then click Connect via tools.
- In the Connect to cluster wizard, enter the IP address of the client or server which will connect to the database and click Add IP. Then click Next. If the IP address was already added, just click Next.
- If not already installed, download the latest ODBC driver for your operating system and install it.
- Click Next and proceed through the wizard until you see your connection details:
- Copy the HOST, PORT, USERNAME, and PASSWORD. You can generate a new Personal Access Token by clicking Generate. You will need this information to connect to your database.
Installing the latest ODBC driver requires you to uninstall a previous version of the Exasol ODBC Driver. After installation, the ODBC driver will be used for all Exasol ODBC connections from your local machine. The ODBC driver is backwards compatible and will work with any existing database connections.
Connect Qlik Sense to Exasol
Follow these steps to connect Qlik Sense desktop tool to an Exasol instance using ODBC connection:
- In Qlik Sense Desktop, from the Qlik Sense Desktop Hub, click on Create New App.
- In the Create New App dialog box, type the name of your new app and click Create, and then click Open app.
- Click Add data from files and other sources, and in the next screen click on ODBC.
- In the Create New Connection (ODBC) dialog box, select your DSN. If your data source requires authentication, then type your credentials in the Username and Password fields.
- Click Create. This action will create and open a connection.
- The Owner drop-down list displays all the schema in your Exasol database. Select the desired schema. As an example, in the below screen shot RETAIL is selected as the owner.
- All the tables for the selected schema is displayed. You can further choose tables and preview the data in the right hand panel. Individual columns can be selected by clicking the Metadata option. When you are done including tables, click Add data.
- The selected data is now imported into Qlik Sense. Once the connection is established, dynamic queries can be run through the Direct Query option within Qlik Sense. For more information, refer to Direct Query.
Load Data Using Direct Query
Using the Direct Query option allows you to view the latest or current data without importing all data into the data sets. Direct Query in Qlik Sense allows you access tables and load data using the Direct Discovery function. For additional information, refer to Direct Query and Direct Discovery on Qlik.
You can follow the below steps to load data using the Direct Query option:
- Open Qlik Sense Desktop. If you can either create a new connection or use an existing data connection.
- Open the data load editor and add your script. The Data load progress dialog is displayed.
- Click Load data on the upper right corner of the screen to run the script. This pre-calculates the distinct values and a summary is displayed.
Below is a sample script to load data using the Direction Query option on Qlik Sense.
LIB CONNECT TO [RETAIL_DEMO];
NATIVE(' ''['' || longitude || '','' || latitude || '']'' ') as GeoCoord
ON ( EXA_DB.RETAIL_STAR.FACT_SALES_POSITIONS.ARTICLE_ID = EXA_DB.RETAIL_STAR.ARTICLE.ARTICLE_ID )
ON ( EXA_DB.RETAIL_STAR.FACT_SALES_POSITIONS.MARKET_ID = EXA_DB.RETAIL_STAR.MARKETS.MARKET_ID )
ON ( EXA_DB.RETAIL_STAR.FACT_SALES_POSITIONS.SALES_DATE = EXA_DB.RETAIL_STAR.Time_1.PK_Date );
TAG FIELDS GeoCoord WITH $geopoint;