Updated on 2024-06-21 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.
  • A Cloud Data Migration (CDM) cluster is used as the network agent to ensure that DLV can communicate with DWS. Ensure that an available CDM cluster exists and is in the same region, AZ, and VPC as the DWS data source. In addition, the CDM cluster and DWS data source must be in the same security group or the security group rule allows them to communicate with each other.

    In CDM, you only need to do nothing but create a CDM cluster.

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

    Name of the CDM cluster. To view all available CDM clusters, click View Agent next to the drop-down list.

    NOTE:

    DWS is not a fully managed service and thus cannot be directly connected to fully managed DLV. A CDM cluster serves as an agent that enables communication between them.

    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