Updated on 2023-03-09 GMT+08:00

Creating Data Warehouse Service Data Connections

Before establishing a data connection to Data Warehouse Service (DWS), ensure that the following conditions are met:

  • You have obtained the IP address, port number, username, and password of DWS.
  • To enable network communication between DLV and DWS, you can use a VPC connection as a network proxy. Create a VPC connection by referring to instructions in Managing VPC Connections.

Creating a DWS Data Connection

  1. Log in to the DLV console.
  2. In the navigation pane on the left, click Data.
  3. On the Data page, click the workspace drop-down list at the top of the page, select the workspace to be accessed, and click New Data Connection.

    Figure 1 Creating a data connection

  4. In the New Data Connection dialog box, set Data Source Type to DWS and set the related parameters.

    Figure 2 Creating a DWS data connection
    Table 1 DWS data connection parameters

    Parameter

    Description

    Name

    Name of the data connection. Must contain 1 to 32 characters and contain only letters, digits, hyphens (-), and underscores (_).

    Cluster Name

    Name of the DWS cluster. To create a DWS cluster, click Create Cluster next to the drop-down list.

    Domain Name

    After a DWS cluster is selected, an intranet domain name of a database will be automatically matched. The domain name is alterable.

    Port

    After a DWS cluster is selected, a database port will be automatically matched. The port is alterable.

    Username

    Username of the database. The database user must have permission to access data tables and metadata.

    Password

    Password of the database user.

    Agent

    Select an available connection agent. To use the VPC connection, create a VPC connection by referring to instructions in Managing VPC Connections.

    Database

    You can select a database from the Database drop-down list.

    NOTE:

    If there is no database displayed, check whether the database username and password are correct. Then, ensure that security group rules have been configured to allow database connections. Ensure that the CDM proxy and the DB instance are in the same VPC. If the fault persists, contact technical support.

    Currently, DLV cannot use CDM 2.9 or later as a proxy.

  5. Click OK.

Using DWS Data Sources

The following example compares visits of a service in different channels through a pie chart.

  1. Log in to the DLV console and click the Screens tab.
  2. On the Screens page, locate the screen to be edited and click on the screen. The screen development page is displayed.

    Figure 3 Editing a screen

  3. Select a pie chart component from the component list on the left, click the Data tab, and set Data Source Type to Database.
  4. In the Data Connection drop-down list, select a created DWS data connection.

    Figure 4 Selecting a DWS data connection

  5. Enter the SQL statement in the SQL editing box.

    Figure 5 Executing the SQL statement

  6. Click View Response Result to view the data response result.

    Figure 6 Viewing the response result

  7. Configure field mapping based on the response data.

    Set y to volume and s to way and then set the legend color.
    Figure 7 Screen effect