This topic describes how to use QlikView to connect to an AnalyticDB for MySQL cluster and build a business intelligence (BI) system.

Prerequisites

  • The MySQL Open Database Connectivity (ODBC) driver is installed. We recommend that you use MySQL Connector/ODBC 3.5.1 or 5.3.
  • QlikView 11.20.x is installed.

Use QlikView to connect to an AnalyticDB for MySQL cluster

  1. On the host where QlikView is installed, choose Control Panel > System and Security > Administrative Tools > ODBC Data Sources. This path may vary with the operating system. In the ODBC Data Source Administrator dialog box that appears, add a system data source name (DSN) and select MySQL ODBC 5.xx Driver as the data source.
    Configure connection parameters
    ParameterDescription
    Data Source NameThe name of the database in the AnalyticDB for MySQL cluster.
    TCP/IP ServerThe endpoint of the AnalyticDB for MySQL cluster to which you want to connect.
    PortThe port number of the AnalyticDB for MySQL cluster endpoint.
    UserThe account used to connect to the AnalyticDB for MySQL cluster. You can use one of the following account types:
    • Privileged account
    • Standard account
    PasswordThe password of the account used to connect to the AnalyticDB for MySQL cluster.
  2. After you configure the preceding parameters, click Test to test the connectivity. After the connection passes the test, click OK to connect to the AnalyticDB for MySQL database.
  3. Start QlikView and choose File > Edit Script. Select the database name specified in Step 1 to test the connectivity.
    Note You can also execute the ODBC CONNECT TO DATABASE_NAME; statement to test the connectivity.
  4. After the database passes the connectivity test, use the following SELECT statement to obtain data from the AnalyticDB for MySQL cluster:
    SELECT * FROM DATABASE_NAME.TABLE_NAME;

    For example, use the following statement to obtain data from the user_info table:

    SELECT * FROM adb_database.user_info;
    Obtain AnalyticDB for MySQL data

Use QlikView

After you obtain data from AnalyticDB for MySQL databases, you can use QlikView to perform more operations. For more information about how to use QlikView, visit QlikView.