Updated on 2024-10-25 GMT+08:00

Creating a CDL Database Connection

Scenario

Create a database link on the CDLService web UI.

Prerequisites

  • You have obtained the driver JAR package of the data to be connected.
  • A user with the CDL management permission has been created for the cluster with Kerberos authentication enabled. For details, see CDL User Permission Management.

Procedure

  1. Access the CDLService web UI as a user with the CDL management permissions or the admin user (for the cluster where Kerberos authentication is not enabled). For details, see Logging In to the CDLService WebUI.
  2. Choose Link Management and click Add Link. In the displayed dialog box, enter the link name (cannot be the same as an existing one) and select the link type.
  3. Set other link parameters based on the link type.

    Table 1 MySQL data link parameters

    Parameter

    Description

    Example Value

    Link Type

    Link type

    mysql

    Name

    Link name

    mysqllink

    DB driver

    Uploaded MySQL driver file mysql-connector-java-8.0.24.jar

    mysql-connector-java-8.0.24.jar

    Host

    IP address of the MySQL database

    10.10.10.10

    Port

    MySQL database port

    3306

    User

    User for accessing the MySQL database

    user

    Password

    Password for accessing the MySQL database

    Password of the user user

    Description

    Data link description.

    xxx

    Table 2 PgSQL data link parameters

    Parameter

    Description

    Example Value

    Link Type

    Link type

    pgsql

    Name

    Link name

    pgsqllink

    Host

    IP address of the PgSQL database

    10.10.10.10

    Port

    PgSQL database port

    5432

    DB Name

    PgSQL database name

    testDB

    User

    User for accessing the PgSQL database

    user

    Password

    Password for accessing the PgSQL database

    Password of the user user

    Description

    Data link description

    xxx

    Table 3 Kafka data link parameters

    Parameter

    Description

    Example Value

    Link Type

    Link type.

    kafka

    Name

    Link name.

    kafkalink

    Description

    Data link description.

    -

    Table 4 Hudi data link parameters

    Parameter

    Description

    Example Value

    Link Type

    Link type.

    hudi

    Name

    Link name.

    hudilink

    Storage Type

    Storage type, which can be either of the following:

    hdfs: Data is stored in HDFS.

    hdfs

    Auth KeytabFile

    Keytab file of a user. You can click Upload File to upload the keytab file.

    Set this parameter only for a cluster in security mode.

    NOTE:

    To obtain this file, log in to FusionInsight Manager and choose System. On the navigation pane on the left, choose Permission > User and choose More > Download User Credential in the Operation column.

    ${BIGDATA_HOME}/FusionInsight_CDL_X.X.X/install/FusionInsight-CDL-X.X.X/cdl/keytabs/cdl.keytab

    Principal

    Domain name of the user who accesses HDFS.

    Set this parameter only for a cluster in security mode.

    cdl/test.com@HADOOP.COM

    Description

    Data link description.

    xxx

    Table 5 thirdparty-kafka data link parameters

    Parameter

    Description

    Example Value

    Link Type

    Link type

    thirdparty-kafka

    Name

    Link name

    thirdparty-kafkalink

    Bootstrap Servers

    Kafka proxy instance, which can be set to a value in the format of Service IP address of the Kafka Broker instance:Kafka port number.

    NOTE:

    If MRS Kafka is used as the source of thirdparty-kafka, log in to FusionInsight Manager, choose Cluster > Services > Kafka, click Configuration, search for the port in the search box, and obtain the port number based on the encryption protocol.

    10.10.10.10:21005

    Security Protocol

    Encryption protocol. Value options are as follows:

    • SASL_PLAINTEXT
    • PLAINTEXT
    • SASL_SSL
    • SSL

    SASL_SSL

    Username

    Username specified when SASL_SSL is enabled during instance creation

    NOTE:

    This parameter is available only when Security Protocol is set to SASL_PLAINTEXT or SASL_SSL.

    test

    Password

    Password configured when SASL_SSL is enabled during instance creation

    NOTE:

    This parameter is available only when Security Protocol is set to SASL_PLAINTEXT or SASL_SSL.

    xxx

    SSL Truststore Location

    Path where the client.truststore.jks authentication file is stored

    NOTE:

    This parameter is available only when Security Protocol is set to SASL_SSL or SSL.

    -

    SSL Truststore Password

    Password of the client.truststore.jks certificate file

    NOTE:

    This parameter is available only when Security Protocol is set to SASL_SSL or SSL.

    xxx

    Datastore Type

    Type of the upper-layer source. Value options are as follows:

    • MRS 3.2.0:
      • opengauss
      • ogg
      • oracle
      • drs-avro-oracle
    • MRS 3.3.0 and later versions:
      • drs-opengauss-json
      • ogg-oracle-avro
      • drs-oracle-json
      • drs-oracle-avro
    • opengauss
    • drs-opengauss-json

    DB driver

    Uploaded thirdparty-kafka driver file

    NOTE:

    This parameter is displayed when Datastore Type is set to ogg (or ogg-oracle-avro for MRS 3.3.0 and later versions).

    -

    Host

    IP address of the thirdparty-kafka database

    NOTE:

    This parameter is not displayed when Datastore Type is set to oracle (or drs-oracle-json for MRS 3.3.0 and later versions).

    11.11.xxx.xxx,12.12.xxx.xxx

    Port

    thirdparty-kafka database port

    NOTE:

    This parameter is not displayed when Datastore Type is set to oracle (or drs-oracle-json for MRS 3.3.0 and later versions).

    8000

    DB Name

    thirdparty-kafka database name

    NOTE:

    This parameter is displayed when Datastore Type is set to opengauss (or drs-opengauss-json for MRS 3.3.0 and later versions).

    opengaussdb

    User

    thirdparty-kafka database access user

    NOTE:

    This parameter is not displayed when Datastore Type is set to oracle (or drs-oracle-json for MRS 3.3.0 and later versions).

    opengaussuser

    DB Password

    Password for accessing the thirdparty-kafka database

    NOTE:

    This parameter is not displayed when Datastore Type is set to oracle (or drs-oracle-json for MRS 3.3.0 and later versions).

    Password of the opengaussuser user

    Sid

    Service ID of Oracle

    NOTE:

    This parameter is displayed when Datastore Type is set to ogg (or ogg-oracle-avro for MRS 3.3.0 and later versions).

    -

    Description

    Data link description.

    -

    Table 6 DWS data link parameters

    Parameter

    Description

    Example Value

    Link Type

    Link type

    dws

    Name

    Link name

    dwslink

    Host

    IP address of the DWS database to be connected

    10.10.10.10

    Port

    Database port

    8000

    DB Name

    Name of the database to be connected to

    default

    User

    Database access user

    test

    Password

    Password for accessing the database

    xxx

    Description

    Data link description.

    -

    Table 7 opengauss data link parameters

    Parameter

    Description

    Example Value

    Link Type

    Link type

    opengauss

    Name

    Link name

    opengausslink

    Host

    IP address of the opengauss database to be connected

    10.10.10.10

    Port

    Database port

    8000

    DB Name

    Name of the database to be connected to

    default

    User

    Database access user

    test

    Password

    Password for accessing the database

    xxx

    Description

    Data link description.

    -

    Table 8 ClickHouse data link parameters

    Parameter

    Description

    Example Value

    Link Type

    Link type

    clickhouse

    Name

    Link name

    clickhouselink

    Host

    Service IP address of the ClickHouseBalancer instance of ClickHouse:HTTP balancer port number. Multiple ClickHouse instances can be connected using commas (,).

    NOTE:

    To obtain the HTTP balancer port number, log in to Manager, choose Cluster > Services > ClickHouse, click Logic Cluster, and obtain the port number from the HTTP Balancer Port column in the cluster list.

    10.10.10.10:21428

    User

    Database access user

    test

    Password

    Password for accessing the database

    xxx

    Description

    Data link description.

    -

  4. After the parameters are configured, click Test to check whether the data link is normal.

    After the test is successful, click OK.