Help Center> Data Lake Insight> Best Practices> Data Analysis> Interconnecting FineBI with DLI Trino
Updated on 2024-05-29 GMT+08:00

Interconnecting FineBI with DLI Trino

FineBI is a BI tool for big data analytics developed by FanRuan Software. It provides business personnel and data analysts with data exploration capabilities such as data management, editing, and visualization. Huawei Cloud DLI integrates data analysis and processing. SQL jobs using the Trino interactive engine are more suitable for interactive analysis and query. It provides FineBI with efficient engine compute capabilities and effective high-quality data for subsequent data statistics and analysis, helping enterprises make data decisions.

This section describes how to interconnect FineBI with DLI.

Solution Overview

This solution uses VPCEP to connect FinBI to DLI.

Figure 1 Architecture

Constraints

  • Trino engine queues support only HTTPS connections.
  • When the Trino engine is used, the created SQL queues cannot be scaled in or out.

    To adjust the CU size of a queue, you need to first delete the queue in the elastic resource pool and then create a queue with Trino as the engine and with an appropriate CU size in the elastic resource pool.

  • The DLI Trino engine is in the open beta test (OBT) phase. If you need it, contact customer service to apply for it.

    The DLI Trino engine is available in the following regions: CN North-Beijing4, CN East-Shanghai1, CN-Hong Kong, AP-Bangkok, AP-Singapore, and AF-Johannesburg.

  • Currently, only foreign tables created using the Hive syntax can be used for FineBI interconnection.

Process

Figure 2 Process of interconnecting DLI with FIineBI

To interconnect FineBI with Huawei Cloud DLI, perform the following steps:

  1. Creating an Elastic Resource Pool and Queue
  2. Configuring Network Connectivity for the DLI Cluster
  3. Installing the Trino Driver for FineBI
  4. Interconnecting FineBI with DLI Trino
  5. Testing the Connection

Solution Advantages

  • As a next-gen BI tool for self-service big data analytics, FineBI provides enterprises with one-stop solutions for enterprise business intelligence, such as multi-source data collection, self-service exploratory analysis, multi-screen support, and enterprise-level management and control.
  • Huawei Cloud DLI provides convergent data analysis and processing capabilities. DLI can interconnect with multiple data sources and map data sources by creating tables using SQL statements. You can use standard SQL statements to compile metric analysis logic without paying attention to the complex distributed computing platform.
  • FineBI interconnects with Huawei Cloud DLI for real-time data ingestion, efficient data processing, and good data visualization. DLI can connect to FineBI from multiple data sources. Fine BI can display DLI data in charts and reports, making data more intuitive and improving decision-making accuracy and efficiency.

Resource Planning and Costs

Table 1 Resource planning and costs

Resource

Description

Cost

OBS

DLI needs to use OBS buckets to store logs.

You will be charged for using the following OBS resources:

  • Storage Fee for storing static website files in OBS.
  • Request Fee for accessing static website files stored in OBS.
  • Traffic Fee for using a custom domain name to access OBS over the public network.

The actual fee depends on the size of the stored file, the number of user access requests, and the traffic volume. Estimate the fee based on your service requirements.

DLI

In this example, an elastic resource pool is used to create SQL jobs.

When using a DLI elastic resource pool, you are billed based on the CUH of the elastic resource pool.

VPCEP

Used to enable the network connection between FineBI and DLI.

For details about the billing for VPCEP, see Billing.

ELB

Elastic Load Balance (ELB) distributes access traffic to multiple backend servers based on distribution policies.

For details about the billing for ELB, see Billing.

EIP

Provides independent public IP addresses and bandwidth for Internet access.

For details about the billing for EIP, see Billing.

Step 1: Creating an Elastic Resource Pool and Queue

  1. Log in to the DLI management console.
  2. In the navigation pane on the left, choose Resources > Resource Pool.
  3. On the Resource Pool page, click Buy Resource Pool in the upper right corner.
  4. On the displayed page, set the following parameters:

    Table 2 Parameters

    Parameter

    Description

    Billing Mode

    Pay-per-use/Yearly/Monthly

    Region

    Select a region near you to ensure the lowest latency possible.

    Project

    Each region corresponds to a project.

    Name

    Name of the elastic resource pool.

    CU Range

    The maximum and minimum CUs allowed for the elastic resource pool.

    Description

    Description of the elastic resource pool.

    CIDR Block

    CIDR block the elastic resource pool belongs. If DLI enhanced datasource connections are required, the CIDR block of the elastic resource pool cannot overlap with that of the data source. The CIDR block of the elastic resource pool cannot be changed after being set.

    Recommended CIDR blocks:

    10.0.0.0~10.255.0.0/16~19

    172.16.0.0~172.31.0.0/16~19

    192.168.0.0~192.168.0.0/16~19

    Enterprise Project

    If the created elastic resource pool belongs to an enterprise project, select the enterprise project.

    Required Duration

    You must specify the Required Duration if Billing Mode is set to Yearly/Monthly. The longer the subscription duration is, the more discounts you can get. If Auto renew is selected, monthly subscriptions are renewed each month. And yearly subscriptions are renewed each year.

    Tag

    Tags used to identify cloud resources.

  5. Click Buy and confirm the configurations.
  6. Wait until the status of the elastic resource pool changes to Available. The elastic resource pool is successfully created.
  7. Add a SQL queue to the elastic resource pool and select Trino as the execution engine.

    When buying a SQL queue, select Trino as the execution engine.

Step 2: Configuring Network Connectivity for the DLI Cluster

  1. On the Queue Management page of the created DLI queue, view the VPC endpoint information of the queue.

    1. On the DLI console, choose Resources > Queue Management, and view the VPC endpoint information about one minute after the queue is created.
    2. Locate the created queue and click in front of the queue name to obtain the VPC endpoint information of the queue.
      Figure 3 VPC endpoint information

  2. Create a VPC endpoint.

    1. Log in to the VPC Endpoint management console.
    2. On the VPC Endpoints page displayed, click Buy VPC Endpoint.
    3. Set Service Category to Find a service by name.
    4. In the VPC Endpoint Service Name field box, enter the obtained VPC endpoint information, excluding the port.

      Example:

      The VPC endpoint information of the queue is xxx.3a715f69-b1b0-45d0-bc4a-d917137bcd08:18090.

      Enter xxx.3a715f69-b1b0-45d0-bc4a-d917137bcd08 in the field box.
      Figure 4 Buy VPC Endpoint page

  3. Obtain the IP address of the VPC endpoint.

    1. In the navigation pane of the VPCEP console, choose VPC Endpoint > VPC Endpoints.
    2. Click the ID of the VPC endpoint and view the node IP address on the Summary tab page.
      Figure 5 IP address of the VPC endpoint

  4. Create an ELB.

    1. Log in to the ELB console.
    2. Click Buy Elastic Load Balancer and then configure the parameters.
      Figure 6 Buy Elastic Load Balancer page

  5. Obtain the service IP address of the ELB.

    1. On the ELB console, choose Elastic Load Balance > Load Balancers.
      Figure 7 Load balancer list
    2. Click the ID of the created load balancer. On the Summary tab page, view the load balancer information, and record the IPv4 EIP address.
      Figure 8 Dedicated load balancer

  6. Create a datasource connection.

    1. Log in to the DLI management console.
    2. In the left navigation pane, choose Datasource Connections.
      On the Enhanced tab page displayed, click Create. In the Create Enhanced Connection dialog box, enter a connection name in Connection Name, set Resource Pool to the elastic resource pool that contains the Trino engine queue created in step 1, and configure VPC and Subnet. For details about the parameters, see Table 3.
      Figure 9 Creating an enhanced datasource connection
      Table 3 Parameters

      Parameter

      Description

      Connection Name

      Name of the datasource connection to be created

      • The name can contain only digits, letters, and underscores (_) but cannot be left blank.
      • Enter a maximum of 64 characters.

      Resource Pool

      It binds an elastic resource pool or queue that uses a datasource connection. This parameter is optional.

      Only dedicated queues charged in yearly/monthly or pay-per-use billing mode can be bound to elastic resource pools.

      In regions where this function is available, an elastic resource pool with the same name is created by default for the yearly/monthly or pay-per-use dedicated queue created in "Creating a Queue."

      NOTE:

      Before using an enhanced datasource connection, you must bind a queue to the connection and ensure that the VPC peering connection is in the Active state.

      VPC

      VPC used by the destination data source

      Subnet

      Subnet used by the destination data source

      Route Table

      Route table of the subnet

      NOTE:
      • The route table is associated with the subnet used by the destination data source, which is not the table containing the route you add by Manage Route in the Operation column. The route you add on the Manage Route page is contained in the route table associated with the subnet used by the queue to be bound.
      • The subnet used by the destination data source must be different from that used by the queue to be bound. Otherwise, a segment conflict occurs.

      Tags

      Tags used to identify cloud resources.

    3. Click OK.
    4. Check whether the datasource connection is successfully created.

      Click the name of the created datasource connection to view its connection status. If the status is Active, the datasource connection is successfully created.

  7. Add a backend server group as the VPC backend. The cross-VPC backend IP address is the IP address of the purchased VPC endpoint.

    1. On the ELB console, choose Elastic Load Balance > Backend Server Groups. On the page displayed, click Create Backend Server Group.
    2. Select the created load balancer for Load Balancer and click Next. On the Backend Servers tab page, click Next. On the Confirm page, click Create Now.
      Figure 10 Creating a backend server group
    3. On the Backend Servers tab page, click Add Backend Server in the Operation column of the created backend server group to add backend servers.
      Figure 11 Cross-VPC backend IP address and service port

  8. Verify that the network connection between VPCEP and DLI is normal.

    On the IP as Backend Servers tab page, check whether the health check result is normal. If yes, the network connection is normal.
    Figure 12 Successful network connection

Step 3: Installing the Trino Driver for FineBI

  1. Install FineBI.
  2. Install the Trino driver for FineBI.

    Visit Trino to download the Trino driver JAR file.

    On the FineBI console, choose Management System > Data Connection Management, click New Driver, click Upload File, and upload the downloaded driver package.
    Figure 13 Configuring the Presto driver

Step 4: Interconnecting FineBI with DLI Trino

Configure the interconnection between FineBI and DLI.
  1. On the FineBI management console, choose Data Connection Management > Create Data Connection > Other > Other JDBC.
  2. Enter information about the data connection.
    1. Enter the data connection name.
    2. Set Driver to Custom and select io.prestosql.jdbc.PrestoDriver as the driver.
    3. Enter the cross-VPC backend IP address for Host and enter the service port in Port. For details, see Creating a backend server group.
    4. Enter the username and password. The username is in the format of Account name/Username/Project ID. For details about how to obtain a project ID, see Obtaining a Project ID. If a primary account is used for connection, Account name and Username are both the account name.
    5. Example data connection URL: jdbc:presto://{ip}/dli/default? SSL=true

      In the URL, SSL=true indicates that backend requests use HTTPS. Currently, Trino engine queues support only HTTPS connections.

      Figure 14 Configuration information

Step 5: Testing the Connection

Click Test Connection in the upper right corner of the FineBI data connection management page. If the connection is successful, you can use the connection to query DLI tables for BI report analytics.
Figure 15 Testing the connection

Related Operations

  • Trino supports the SQL syntax. For details about the Trino SQL syntax, see Trino SQL Syntax. Currently, the Trino engine supports only the SELECT query operation.