Updated on 2024-07-23 GMT+08:00

Adding Yonghong BI Data Source

Scenario

Add the DLI data source to the Yonghong SaaS production environment.

Procedure

  1. On the homepage of the Yonghong SaaS production environment, click Create Connection from the left navigation tree. See Figure 1.

    Figure 1 Adding a connection

  2. On the New Connection Type page, choose GENERIC for the type of the new connection. See Figure 2.

    Figure 2 Choosing a new connection type

  3. Configure the new connection. See Figure 3.

    In Driver, enter com.huawei.dli.jdbc.DliDriver.

    In URL, select Self-defined Protocol. Enter the URL of the DLI JDBC driver. For details about the URL format and the attributes, see Table 1 and Table 2, respectively.
    • In Schema, you can optionally enter the name of the database to be accessed. If you enter the name, only tables in the database are displayed during data set creation. If you do not enter the name, tables in all databases are displayed during data set creation. For details about how to create a data set, see Creating Yonghong BI Data Set.
    • Retain default values of other parameters. You do not need to select Request Login.
    Figure 3 Configuring the new connection
    Table 1 Database connection parameters

    Parameter

    Description

    URL

    The URL format is as follows:

    jdbc:dli://<endPoint>/<projectId>?<key1>=<val1>;<key2>=<val2>...

    NOTE:
    • endpoint indicates the domain name of DLI. For details, see Regions and Endpoints.
    • projectId indicates the project ID, which can be obtained from the My Credentials page of the public cloud platform.
    • The question mark (?) is followed by other configuration items. Each configuration item is listed in the "key=value" format. Semicolons (;) are used to separate configuration items. For details, see Table 2.
    Table 2 Attribute-related configuration items

    Attribute (key)

    Mandatory

    Default Value (value)

    Description

    queuename

    Yes

    -

    Queue name of DLI.

    databasename

    No

    -

    Default database to be accessed. If this parameter is not specified in the URL, you need to use db.table (for example, select * from dbother.tabletest) to access tables in the database.

    authenticationmode

    Yes

    token

    Authentication method, which can be token or aksk. Value aksk is recommended during the interconnection with Yonghong BI system.

    accesskey

    This parameter must be configured if authenticationmode is set to aksk.

    -

    For details, see Preparing for Yonghong BI Interconnection.

    secretkey

    This parameter must be configured if authenticationmode is set to aksk.

    -

    For details, see Preparing for Yonghong BI Interconnection.

    regionname

    This parameter must be configured if authenticationmode is set to aksk.

    -

    For details, see Regions and Endpoints.

    servicename

    This parameter must be configured if authenticationmode is set to aksk.

    -

    servicename=dli

    dli.sql.checkNoResultQuery

    No

    false

    Whether to allow invoking the executeQuery API to execute statements (for example, DDL) that do not return results.

    • Value false indicates that invoking of the executeQuery API is allowed.
    • Value true indicates that invoking of the executeQuery API is not allowed.
    NOTE:

    If dli.sql.checkNoResultQuery is set to false, non-query statements will be executed twice.

  4. On the tool bar of the displayed page, click Test Connection. After the test is complete, click Save. Enter the data source name, and save the data source.

    Currently, you are not allowed to save the data source to the root directory. Therefore, you can only save the data source to an existing folder.