Creating Data Connections

You can create data connections by configuring data sources. Metadata management allows you to create, edit, and delete data connections, as well as test their connectivity. Data connections can be used for collection tasks, business metrics, and data quality jobs. If there are any changes made to the saved information, update the related data connections.

Prerequisites

  • An EIP is available and the EIP is in the same VPC, security group, and subnet as the data connection.
  • You have created a database to connect, or have subscribed to a cloud service to access.
    • Before creating a DWS data connection, ensure that you have created a cluster in DWS and have the permissions required to view KMS keys.
    • Before creating an MRS HBase, MRS Hive, MRS Kafka, MRS Ranger, or MRS Spark data connection, ensure that you have bought an MRS cluster and selected required components when buying the cluster.
    • Before creating an RDS data connection, ensure that you have bought an RDS DB instance. Currently, DGC supports only MySQL and PostgreSQL databases in RDS.
  • The data source communicates with the DGC instance properly.
    • If the data source is a cloud service (such as DWS, RDS, DIS, and MRS), ensure that the cloud service instance and the DGC instance are in the same region, AZ, VPC, and subnet, and the security group rule allows the cloud service to communicate with the DGC instance. You must also ensure that the cloud service instance and the DGC workspace belong to the same enterprise project. If they do not, you can modify the enterprise project of the workspace by following the instructions provided in Editing a Workspace.
    • If the data source is an on-premises MySQL database, ensure that the host where the data source is located can access the Internet and the port has been enabled in the firewall rule.
  • If you want to create a data connection in proxy mode, ensure that you have created a CDM cluster.

Creating a Data Connection

  1. Log in to the DGC console, select a DGC instance, and click Access.

    On the displayed page, click the Workspaces tab. In the workspace list, locate the required workspace.

  2. Choose More > Management Center in the Quick Entry column.
  1. On the Data Connection Management page, click Create Data Connection. Select a data connection type and set the relevant parameters. See Table 1.
    Table 1 Data connections

    Data Connection Type

    Link

    MRS Hive

    Table 2

    MRS HBase

    Table 3

    MRS Kafka

    Table 4

    MRS Ranger

    Table 11

    DWS

    Table 7

    DLI

    Table 8

    ORACLE

    Table 9

    MRS Spark

    Table 5

    RDS

    Table 6

    Host connection

    Creating a Host Connection

    MRS Presto

    Table 12

    DIS

    Table 10

    MySQL (to be taken offline)

    Table 13

  2. Click Test to test connectivity of the data connection. If the test passes, the data connection is created.
  3. Click OK.

Data Connection Parameter Description

Table 2 MRS Hive data connection

Parameter

Mandatory

Description

Data Connection Name

Yes

The name of the data connection to create. Data connection names can contain 1 to 50 characters. They can include only letters, numbers, underscores (_), and hyphens (-).

Tag

No

The attribute of the data connection to create. Tags make management easier. You can set a tag or select a tag created in Tags from the drop-down list.

NOTE:

The name of the tag. Only letters, numbers, and underscores (_) are allowed. Tag names cannot start with underscores (_). Enter up to 100 characters.

Cluster Name

Yes

The name of the MRS Hive cluster. Select an MRS cluster that Hive belongs to. If the MRS cluster is not displayed in the drop-down list, check whether the MRS cluster and the DGC instance are in the same region, AZ, and VPC. If they are not, create an MRS cluster. The MRS cluster and the DGC workspace must belong to the same enterprise project. If they do not, you can modify the enterprise project of the workspace by following the instructions provided in Editing a Workspace.

NOTE:
  • If you select MRS API connection, secure and non-secure clusters of MRS 2.X are supported.
  • If you select Proxy connection, secure and non-secure clusters of all MRS versions are supported.

Connection Type

Yes

Methods that MRS uses to connect to DGC.

  • Proxy connection
  • MRS API connection

    When you select MRS API connection, pay attention to the following restrictions:

    1. Tables and fields cannot be viewed.
    2. When the SQL editor is used to run SQL statements, the execution results can be displayed only in logs.
    3. Data governance is not supported.

Username

Yes

The username of the MRS cluster. This parameter is mandatory when Connection Type is set to agent.

You cannot create a data connection for an MRS security cluster as user admin. User admin is the management page user by default and cannot be used as the authentication user of a security cluster. You can create an MRS user by referring to Creating a Kerberos Authentication User for an MRS Security Cluster. When creating an MRS data connection, set Username and Password to the new MRS username and password.

Password

Yes

The password for accessing the MRS cluster. This parameter is mandatory when Connection Type is set to Proxy connection.

KMS Key

Yes

The name of the KMS key. This parameter is mandatory when Connection Type is set to Proxy connection.

Agent

Yes

MRS is not a fully managed service and cannot be directly connected to DGC. A CDM cluster can provide an agent for DGC to communicate with non-fully managed services. Therefore, select a CDM cluster when creating an MRS Hive data connection. If there is no CDM cluster, create one.

Table 3 MRS HBase data connection

Parameter

Mandatory

Description

Data Connection Name

Yes

The name of the data connection to create. Data connection names can contain 1 to 50 characters. They can include only letters, numbers, underscores (_), and hyphens (-).

Tag

No

The attribute of the data connection to create. Tags make management easier. You can set a tag or select a tag created in Tags from the drop-down list.

NOTE:

The name of the tag. Only letters, numbers, and underscores (_) are allowed. Tag names cannot start with underscores (_). Enter up to 100 characters.

Cluster Name

Yes

The name of the MRS HBase cluster. Select an MRS cluster that HBase belongs to.

Username

Yes

The username of the MRS cluster. This parameter is mandatory when Connection Type is set to agent.

You cannot create a data connection for an MRS security cluster as user admin. User admin is the management page user by default and cannot be used as the authentication user of a security cluster. You can create an MRS user by referring to Creating a Kerberos Authentication User for an MRS Security Cluster. When creating an MRS data connection, set Username and Password to the new MRS username and password.

Password

Yes

The password for accessing the MRS cluster. This parameter is mandatory when Connection Type is set to Proxy connection.

KMS Key

Yes

The name of the KMS key. This parameter is mandatory when Connection Type is set to Proxy connection.

Agent

Yes

MRS is not a fully managed service and cannot be directly connected to DGC. A CDM cluster can provide an agent for DGC to communicate with non-fully managed services. Therefore, select a CDM cluster when creating an MRS HBase data connection. If there is no CDM cluster, create one.

Table 4 MRS Kafka data connection

Parameter

Mandatory

Description

Data Connection Name

Yes

The name of the data connection to create. Data connection names can contain 1 to 50 characters. They can include only letters, numbers, underscores (_), and hyphens (-).

Tag

No

The attribute of the data connection to create. Tags make management easier. You can set a tag or select a tag created in Tags from the drop-down list.

NOTE:

The name of the tag. Only letters, numbers, and underscores (_) are allowed. Tag names cannot start with underscores (_). Enter up to 100 characters.

Cluster Name

Yes

The name of the MRS Kafka cluster. Select an MRS cluster that Kafka belongs to.

Username

Yes

The username of the MRS cluster. This parameter is mandatory when Connection Type is set to agent.

You cannot create a data connection for an MRS security cluster as user admin. User admin is the management page user by default and cannot be used as the authentication user of a security cluster. You can create an MRS user by referring to Creating a Kerberos Authentication User for an MRS Security Cluster. When creating an MRS data connection, set Username and Password to the new MRS username and password.

Password

Yes

The password for accessing the MRS cluster. This parameter is mandatory when Connection Type is set to Proxy connection.

Agent

Yes

MRS is not a fully managed service and cannot be directly connected to DGC. A CDM cluster can provide an agent for DGC to communicate with non-fully managed services. Therefore, select a CDM cluster when creating an MRS Kafka data connection. If there is no CDM cluster, create one.

Table 5 MRS Spark data connection

Parameter

Mandatory

Description

Data Connection Name

Yes

The name of the data connection to create. Data connection names can contain 1 to 50 characters. They can include only letters, numbers, underscores (_), and hyphens (-).

Tag

No

The attribute of the data connection to create. Tags make management easier. You can set a tag or select a tag created in Tags from the drop-down list.

NOTE:

The name of the tag. Only letters, numbers, and underscores (_) are allowed. Tag names cannot start with underscores (_). Enter up to 100 characters.

Cluster Name

Yes

The name of the Spark cluster. Select an MRS cluster that Spark belongs to.

NOTE:
  • If you select MRS API connection, secure and non-secure clusters of MRS 2.X are supported.
  • If you select Proxy connection, secure and non-secure clusters of all MRS versions are supported.

Connection Type

Yes

Methods that MRS uses to connect to DGC.

  • Proxy connection
  • MRS API connection

    When you select MRS API connection, pay attention to the following restrictions:

    1. Tables and fields cannot be viewed.
    2. When the SQL editor is used to run SQL statements, the execution results can be displayed only in logs.
    3. Data governance is not supported.

Username

No

The username of the MRS cluster. This parameter is mandatory when Connection Type is set to agent.

You cannot create a data connection for an MRS security cluster as user admin. User admin is the management page user by default and cannot be used as the authentication user of a security cluster. You can create an MRS user by referring to Creating a Kerberos Authentication User for an MRS Security Cluster. When creating an MRS data connection, set Username and Password to the new MRS username and password.

Password

No

The password for accessing the MRS cluster. This parameter is mandatory when Connection Type is set to Proxy connection.

KMS Key

No

The name of the KMS key. This parameter is mandatory when Connection Type is set to Proxy connection.

Agent

No

This parameter is mandatory when Connection Type is set to Proxy connection.

MRS is not a fully managed service and cannot be directly connected to DGC. A CDM cluster can provide an agent for DGC to communicate with non-fully managed services. Therefore, select a CDM cluster when creating a Spark data connection. If there is no CDM cluster, create one.

As a network proxy, the CDM cluster must be able to communicate with the MRS cluster. To ensure network connectivity, the CDM cluster must be in the same region, AZ, VPC, and subnet as the MRS cluster. The security group rule must also allow the CDM cluster communicate with the MRS cluster.

Table 6 RDS data connection

Parameter

Mandatory

Description

Data Connection Name

Yes

The name of the data connection to create. Data connection names can contain 1 to 50 characters. They can include only letters, numbers, underscores (_), and hyphens (-).

Tag

No

The attribute of the data connection to create. Tags make management easier. You can set a tag or select a tag created in Tags from the drop-down list.

NOTE:

The name of the tag. Only letters, numbers, and underscores (_) are allowed. Tag names cannot start with underscores (_). Enter up to 100 characters.

IP Address

Yes

The address for accessing RDS.

To obtain the RDS access address:

  1. Log in to the management console using the registered account.
  2. Click Relational Database Service and select Instance Management from the list on the left.
  3. Click the name of an instance. The basic information page of the instance is displayed.

You can obtain the IP address on the Connection Information tab.

Port

Yes

The port for accessing RDS.

To obtain the RDS access port:

  1. Log in to the management console using the registered account.
  2. Click Relational Database Service and select Instance Management from the list on the left.
  3. Click the name of an instance. The basic information page of the instance is displayed.

You can obtain the database port on the Connection Information tab.

Driver Name

Yes

The name of the driver. The following values are available:

  • com.mysql.jdbc.Driver
  • org.postgresql.Driver

Driver File Path

Yes

The driver file is stored on OBS. You can download the driver file from the official website and upload it to OBS.

NOTE:

The RDS data connection driver is cached in the CDM cluster. Therefore, if the driver is updated, you must restart the CDM cluster in Data Integration and then edit the data connection to upload the driver again.

Username

Yes

The username of the database. The username is required for creating a cluster.

Password

Yes

The password for accessing the database. The password is required for creating a cluster.

KMS Key

Yes

The name of the KMS key.

To obtain the key:

  1. Log in to the management console using the registered account.
  2. Click Key Management Service and select Key Management Service from the list on the left.

You can obtain the key name from the key list.

Agent

Yes

RDS is not a fully managed service and cannot be directly connected to DGC. A CDM cluster can provide an agent for DGC to communicate with non-fully managed services. Therefore, select a CDM cluster when creating an RDS data connection. If there is no CDM cluster, create one.

Table 7 DWS data connection

Parameter

Mandatory

Description

Data Connection Name

Yes

The name of the data connection to create. Data connection names can contain 1 to 50 characters. They can include only letters, numbers, underscores (_), and hyphens (-).

Tag

No

The attribute of the data connection to create. Tags make management easier. You can set a tag or select a tag created in Tags from the drop-down list.

NOTE:

The name of the tag. Only letters, numbers, and underscores (_) are allowed. Tag names cannot start with underscores (_). Enter up to 100 characters.

Manual

Yes

You can turn off or turn on to disable or enable the Manual function.

  • When Manual is disabled, you do not need to enter the IP address and port.
  • When Manual is enabled, you must enter the IP address and port.

IP Address

No

The IP address for accessing the cluster database through the internal network. This parameter is mandatory when Manual is enabled. The private network address is automatically generated when you create a cluster.

Port

No

The database port specified during DWS cluster creation. This parameter is mandatory when Manual is enabled. Ensure that you have enabled this port in the security group rule so that the DGC instance can connect to the database in the DWS cluster through this port.

Cluster Name

Yes

The name of the selected DWS cluster.

Username

Yes

The database username, which is specified when the DWS cluster is created.

Password

Yes

The password for accessing the database, which is specified when the DWS cluster is created.

KMS Key

Yes

Key created on KMS and used for encrypting and decrypting user passwords and key pairs. You can select a created key from KMS.

Connection Type

Yes

Methods that DWS uses to connect to DGC:

  • Proxy connection: You need to bind an agent provided by the CDM cluster.
  • Direct connection

Agent

Yes

A CDM cluster can provide an agent for DGC to communicate with non-fully managed services. Therefore, select a CDM cluster when creating a DWS data connection. If there is no CDM cluster, create one.

Table 8 DLI data connection

Parameter

Mandatory

Description

Data Connection Name

Yes

The name of the data connection to create. Data connection names can contain 1 to 50 characters. They can include only letters, numbers, underscores (_), and hyphens (-).

Tag

No

The attribute of the data connection to create. Tags make management easier. You can set a tag or select a tag created in Tags from the drop-down list.

NOTE:

The name of the tag. Only letters, numbers, and underscores (_) are allowed. Tag names cannot start with underscores (_). Enter up to 100 characters.

Project Selection

Yes

The name of a project selected to connect to the DLI database in the project.

Table 9 Oracle data connection

Parameter

Mandatory

Description

Data Connection Name

Yes

The name of the data connection to create. Data connection names can contain 1 to 50 characters. They can include only letters, numbers, underscores (_), and hyphens (-).

Tag

No

The attribute of the data connection to create. Tags make management easier. You can set a tag or select a tag created in Tags from the drop-down list.

NOTE:

The name of the tag. Only letters, numbers, and underscores (_) are allowed. Tag names cannot start with underscores (_). Enter up to 100 characters.

ip

Yes

The IP address of the database to connect. Both public and private IP addresses are supported.

Port

Yes

The port of the database to connect.

Username

Yes

The username of the account for accessing the database. This account must have the permissions required to read and write data tables and metadata.

Password

Yes

User password.

sid

Yes

The unique identifier of the Oracle database.

KMS Key

Yes

The name of the KMS key.

To obtain the key:

  1. Log in to the management console using the created account.
  2. Click Key Management Service and select Key Management Service from the list on the left.

You can obtain the key name from the key list.

Agent

Yes

Oracle is not a fully managed service and cannot be directly connected to DGC. A CDM cluster can provide an agent for DGC to communicate with non-fully managed services. Therefore, select a CDM cluster when creating an Oracle data connection. If there is no CDM cluster, create one.

Table 10 DIS connection

Parameter

Mandatory

Description

Data Connection Name

Yes

The name of the data connection to create. Data connection names can contain 1 to 50 characters. They can include only letters, numbers, underscores (_), and hyphens (-).

Tag

No

The attribute of the data connection to create. Tags make management easier. You can set a tag or select a tag created in Tags from the drop-down list.

NOTE:

The name of the tag. Only letters, numbers, and underscores (_) are allowed. Tag names cannot start with underscores (_). Enter up to 100 characters.

Destination Project ID

Yes

The ID of the project that the destination DIS stream belongs to. The DIS Client node is used to send messages to the destination DIS stream.

Destination Region

Yes

The region that the destination DIS stream belongs to. The DIS Client node is used to send messages to the destination DIS stream.

Access Key

Yes

The AK of the tenant who creates the destination DIS stream that receives messages from the DIS Client node.

Secret Key

Yes

The SK of the tenant who creates the destination DIS stream that receives messages from the DIS Client node.

KMS Key

Yes

The name of the KMS key.

To obtain the key:

  1. Log in to the management console using the registered account.
  2. Click Key Management Service and select Key Management Service from the list on the left.

You can obtain the key name from the key list.

Table 11 MRS Ranger data connection

Parameter

Mandatory

Description

Data Connection Name

Yes

The name of the data connection to create. Data connection names can contain 1 to 50 characters. They can include only letters, numbers, underscores (_), and hyphens (-).

Tag

No

The attribute of the data connection to create. Tags make management easier. You can set a tag or select a tag created in Tags from the drop-down list.

NOTE:

The name of the tag. Only letters, numbers, and underscores (_) are allowed. Tag names cannot start with underscores (_). Enter up to 100 characters.

Cluster Name

Yes

The name of the MRS Ranger cluster. Select an MRS cluster that Ranger belongs to.

Username

Yes

Username of the MRS cluster. This parameter is mandatory.

You cannot create a data connection for an MRS security cluster as user admin. User admin is the management page user by default and cannot be used as the authentication user of a security cluster. You can use the username created in step 2 of Viewing the List of MRS Ranger Clusters.

Password

Yes

Password for accessing the MRS cluster. You can use the password created in step 2 of Viewing the List of MRS Ranger Clusters.

KMS Key

Yes

KMS key name.

Agent

Yes

MRS is not a fully managed service. It cannot be directly connected to DGC, but a CDM cluster can provide an agent for DGC to communicate with non-fully managed services. Therefore, select a CDM cluster when creating an MRS Ranger data connection and ensure that the CDM cluster and MRS cluster are in the same security group. If no CDM cluster is available, create one.

Creating a Host Connection

Managing a Host Connection describes the host connection details.

Table 12 MRS Presto data connection

Parameter

Mandatory

Description

Data Connection Name

Yes

The name of the data connection to create. Data connection names can contain 1 to 50 characters. They can include only letters, numbers, underscores (_), and hyphens (-).

Tag

No

The attribute of the data connection to create. Tags make management easier. You can set a tag or select a tag created in Tags from the drop-down list.

NOTE:

The name of the tag. Only letters, numbers, and underscores (_) are allowed. Tag names cannot start with underscores (_). Enter up to 100 characters.

Cluster Name

Yes

Name of the MRS cluster to which Presto belongs.

Table 13 MySQL data connection (to be taken offline)

Parameter

Mandatory

Description

Data Connection Name

Yes

The name of the data connection to create. Data connection names can contain 1 to 50 characters. They can include only letters, numbers, underscores (_), and hyphens (-).

Tag

No

The attribute of the data connection to create. Tags make management easier. You can set a tag or select a tag created in Tags from the drop-down list.

NOTE:

The name of the tag. Only letters, numbers, and underscores (_) are allowed. Tag names cannot start with underscores (_). Enter up to 100 characters.

IP

No

The IP address for accessing the cluster database through the internal network. This parameter is mandatory when Manual is enabled. The private network address is automatically generated when you create a cluster.

Port

No

The database port specified during MySQL database creation. This parameter is mandatory when Manual is enabled. Ensure that you have enabled this port in the security group rule so that the DGC instance can connect to the MySQL database through this port.

Username

Yes

The database username, which is specified when the MySQL database is created.

Password

Yes

The password for accessing the database, which is specified when the MySQL database is created.

KMS Key

Yes

Key created on KMS and used for encrypting and decrypting user passwords and key pairs. You can select a created key from KMS.

Agent

Yes

A CDM cluster can provide an agent for DGC to communicate with non-fully managed services. Therefore, select a CDM cluster when creating a MySQL data connection. If there is no CDM cluster, create one.

Creating a Kerberos Authentication User for an MRS Security Cluster

You cannot create a data connection for an MRS security cluster as user admin. User admin is the management page user by default and cannot be used as the authentication user of a security cluster. To create an MRS user, perform the following steps:

For clusters of MRS 3.x:

  1. Log in to MRS Manager as user admin.
  2. Choose System > Permission > User. On the displayed page, click Create to add a dedicated user as the Kerberos authentication user. Select the user group superGroup for the user, and assign all roles to the user.
  3. Log in to MRS Manager as the new user and change the initial password.

For clusters of MRS 2.x or earlier:

  1. Log in to MRS Manager as user admin.
  2. Choose System > Manage User. On the displayed page, add a dedicated user as the Kerberos authentication user. Select the user group superGroup for the user, and assign all roles to the user.
  3. Log in to MRS Manager as the new user and change the initial password.

Editing a Data Connection

  1. Log in to DGC Management Center and click Data Connection Management.
  2. In the data connection list, locate the data connection you want to edit and click Edit in the Operation column.
  3. In the Edit Data Connection dialog box, modify connection parameters as required. For parameter details, see Data Connection Parameter Description.
  4. Click Test to test whether the data connection is valid. If the connection is normal, click OK.

    If the test connection is invalid, the data connection cannot be created. Modify the connection parameters as prompted and try again.

Deleting a Data Connection

If a data connection is deleted, the data table information of the data connection will also be deleted. Exercise caution when performing this operation. If the data connection you want to delete has been referenced, it cannot be deleted.

  1. Log in to DGC Management Center and click Data Connection Management.
  2. In the data connection list, locate the data connection you want to delete and click Delete in the Operation column.
  3. In the dialog box displayed, confirm the data connection information, and click Yes.