El contenido no se encuentra disponible en el idioma seleccionado. Estamos trabajando continuamente para agregar más idiomas. Gracias por su apoyo.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ Data Lake Insight/ Best Practices/ Connecting BI Tools to DLI for Data Analysis/ Configuring FineBI to Connect to DLI Using Kyuubi for Data Query and Analysis

Configuring FineBI to Connect to DLI Using Kyuubi for Data Query and Analysis

Updated on 2025-02-26 GMT+08:00

FineBI is an intelligent, visual tool that focuses on data analysis and visualization. It can connect to various data sources and transform intricate data into user-friendly charts and dashboards, allowing for swift and efficient data analysis.

Kyuubi is a distributed SQL query engine that provides standard SQL APIs. This allows you to easily access and analyze data stored on big data platforms.

By connecting FineBI to Kyuubi, you can use Kyuubi to access DLI for data query and analysis. This integration simplifies data access and provides unified data management and analysis, enabling you to gain deeper insights into data.

This section describes how to configure FineBI to connect to DLI using Kyuubi to access and analyze data in DLI.

Procedure

Figure 1 Process

Step 1: Install and Connect Kyuubi to DLI

To access Kyuubi from an external network, ensure that an EIP is bound to the ECS and ports 10009 and 3309 are enabled in the inbound rules of the security group.

  1. Install JDK.

    Install JDK in your development environment before you can install and use Kyuubi.

    Java SDKs require JDK 1.8 or later. To ensure compatibility with future versions, you are advised to use version 1.8.

    1. Download the JDK.

      Download the JDK 1.8 installation package from Oracle official website and install it.

      In this example, jdk-8u261-linux-x64.tar.gz is used.

    2. Upload the JDK package to the corresponding directory of the Linux server and run the extraction command. In this example, the package is uploaded to /usr/local.
      sudo tar -xzf jdk-8u261-linux-x64.tar.gz -C /usr/local/
    3. Configure environment variables.

      Add the following content to the .bashrc or .profile file:

      export JAVA_HOME=/usr/local/jdk-1.8.0_261
      export PATH=$PATH:$JAVA_HOME/bin
    1. Apply the environment variables.
      source ~/.bashrc
    2. Run java -version to check whether the installation is successful. If the version number is displayed in the command output, the Java environment is successfully installed.
      java version "1.8.0_261"
      Java(TM) SE Runtime Environment (build 1.8.0_261-b12)
      Java HotSpot(TM) 64-Bit Server VM (build 25.261-b12, mixed mode)

  2. Install Kyuubi.

    1. Download the Kyuubi installation package. Refer to Deploying Kyuubi to learn more how to install Kyuubi.
    2. Extract the downloaded package.
      tar -xzf kyuubi-{version}-bin.tar.gz
    3. (Optional) Configure environment variables.

      Add the bin directory of Kyuubi to PATH environment variables to ensure that Kyuubi scripts can be called at any location.

  3. Connect Kyuubi to DLI.

    1. Add the DLI driver to the root directory of Kyuubi.

      Place the driver in Kyuubi's root directory /externals/engines/jdbc.

      Ensure that the user group and permissions of the plug-in are the same as those of other JAR files.

    2. Modify the Kyuubi configuration file.

      cd $KYUUBI_HOME/confvi kyuubi-defaults.conf

      Table 1 describes the parameters.

      Table 1 Kyuubi parameters

      Parameter

      Description

      Mandatory

      Example Value

      kyuubi.engine.type

      JDBC service type. Set it to dli.

      Yes

      jdbc

      kyuubi.engine.jdbc.type

      Engine type. Set it to dli.

      Yes

      dli

      kyuubi.engine.jdbc.driver.class

      Name of the driver class used to connect JDBC. Set it to com.huawei.dli.jdbc.DliDriver.

      Yes

      com.huawei.dli.jdbc.DliDriver

      kyuubi.engine.jdbc.connection.url

      URL used to connect JDBC.

      Format: jdbc:dli://{dliendpoint}/{projectId}.

      Yes

      jdbc:dli://{dliendpoint} /{projectId}

      kyuubi.engine.jdbc.session.initialize.sql

      Initialization SQL statements executed when a JDBC session is established.

      No

      select 1

      If select 1 is displayed on the DLI management console, the initialization is successful.

      kyuubi.frontend.protocols

      Frontend protocol supported by Kyuubi. Kyuubi supports various frontend protocols, allowing you to interact with Kyuubi through different APIs.

      Yes

      • mysql
      • thrift_binary

      kyuubi.engine.dli.schema.show.name

      How the Kyuubi engine shows the schema name of data source APIs when you run show schemas or show databases.

      • true: The DLI name is included as the prefix when the schema name is shown.
      • false: The DLI name is not included when the schema name is shown.

      For example, if it is set to true and the DLI name is hive, the output is in the hive.default format when you run show schemas.

      If it is set to false, the output is in the default format.

      No

      • true
      • false

      kyuubi.engine.dli.jdbc.connection.region

      Region name.

      Yes

      regionname=ap-southeast-2

      kyuubi.engine.dli.jdbc.connection.queue

      DLI queue name.

      Yes

      dli_test

      kyuubi.engine.dli.jdbc.connection.database

      Default database name used when the Kyuubi engine connects to the DLI data source through JDBC.

      Yes

      tpch

      kyuubi.engine.dli.jdbc.connection.ak

      AK that acts as the authentication key.

      Set it if authenticationmode is aksk.

      Yes

      accesskey=your-access-key

      kyuubi.engine.dli.jdbc.connection.sk

      Region name.

      Set it if authenticationmode is aksk.

      Yes

      secretkey=your-secret-key

      kyuubi.engine.dli.jdbc.connection.project

      ID of the project where DLI resources are.

      Yes

      0b33ea2a7e0010802fe4c009bb05076d

      kyuubi.engine.dli.sql.limit.time.sec

      Execution duration limit of a SQL query.

      The default value is 600 seconds.

      No

      300

      kyuubi.engine.dli.result.line.num.limit

      Maximum number of data records returned for a SQL query.

      By default, 100,000 data records are returned.

      Setting it to -1 means that the number of returned data records is not limited.

      Yes

      50000

      kyuubi.engine.dli.small.file.merge

      Whether to enable automatic small file merging. The default value is false, indicating that the function is disabled.

      • true: Enable
      • false: Disable

      Yes

      true

      kyuubi.engine.dli.bi.type

      BI tool type.

      The options are fine, grafana, superset, tableau, power, dbt, and yongHong.

      Yes

      fine

      kyuubi.engine.dli.boolean.type.to.int

      Whether DLI's Boolean data is returned as 1/0 or true/false.

      If the BI tool type is grafana, set this parameter to true.

      • true: returned as 1/0 (1: true; 0: false)
      • false: returned as true/false.

      The default value is false.

      No

      false

      kyuubi.engine.dli.set.conf.transform.to.annotation

      Allows you to set set spark in SQL statements.

      Set it to true for Power BI, FineBI, Superset, and DBT.

      No

      true

      kyuubi.engine.dli.set.conf.sql.suffix

      Allows you to set set spark at the end of SQL statements.

      Set it to true for Power BI and DBT.

      No

      true

      kyuubi.engine.dli.result.cache.enable

      Whether to enable database table data caching. Once enabled, database table data is automatically cached. The default value is true.

      • true: Enable
      • false: Disable

      No

      true

      kyuubi.engine.dli.cache.limit.line.num

      Maximum number of data records that can be cached.

      By default, 100,000 data records are cached.

      Setting it to -1 means that the number of cached data records is not limited.

      No

      1000

      kyuubi.engine.dli.cache.time.sec

      Cache time.

      The default value is 1800 seconds.

      No

      1800

      kyuubi.operation.incremental.collect

      Kyuubi pre-loads select result data into the cache to accelerate data reading. You are advised to disable this function to avoid memory OOM issues when dealing with large volumes of data.

      No

      false

      Setting it to false indicates disabling preloading.

      kyuubi.engine.jdbc.memory

      Memory of the JDBC engine process.

      The default value is 1g. You are advised to set it to at least 5g to increase memory for the JDBC engine process.

      No

      5g

    3. Quickly start Kyuubi.

      Go to the root directory /bin of the ECS and run the following command to start Kyuubi:

      cd /bin
      ./kyuubi start  restart

      Once the start is successful, run SQL statements to check whether the connection between Kyuubi and DLI is normal.

  4. (Optional) Configure the hosts file to speed up access to Kyuubi.

    To make access to Kyuubi faster, you are advised to add the Kyuubi host IP address to the /etc/hosts file on the host.

    1. Run ifconfig to check the IP address of the host.
      Figure 2 Checking the host IP address
    2. Add the IP address to the /etc/hosts file.
      Figure 3 Adding the host IP address to the /etc/hosts file

Step 2: Install FineBI and the Data Connection Driver

  1. Download and install FineBI.

    1. Download the FineBI installation package.
    2. Find the downloaded FineBI installation program file.
    3. Double-click the installation program.
    4. Follow the installation wizard to perform installation operations, including accepting the license agreement, selecting the installation type (typical or custom), and setting the installation directory.

  2. Integrate the JDBC driver with FineBI.

    1. Download the data driver. Download the Hive JDBC driver package. Version 2.6.23 is recommended.
    2. Integrate the driver plug-in with FineBI.
      1. Open FineBI.
      2. Choose Data Connection > Data Connection Management.
      3. Click New Driver. In the driver list, select the driver in 2.a.

Step 3: Connect FineBI to Kyuubi

  1. Open FineBI.
  2. Choose Data Connection > Data Connection Management.
  3. Click Add Data Source.
  4. Select a database type in the data source wizard. In this example, Hadoop Hive is selected.
  5. Configure database connection information.
    • Data Connection Name: Enter a data connection name.
    • Driver: Select the driver in 2.a.
    • Database Name: Enter the DLI database name.
    • Host: Enter the IP address of the host where Kyuubi is installed.
    • Port: Enter the port used to access the Kyuubi host. The default port is 10009.
    • Authentication Method: Select Username and Password for this example.
    • Username: username used to access the Kyuubi database.
    • Password: password used to access the Kyuubi database.
    • Data Connection URL:

      Hive 0.11.0 or later:

      jdbc:hive2://localhost:10009/databasename
      Example: jdbc:hive2://100.xx.xxx.243:10009/tpch

Common Operations: Setting SQL Job Parameters

  1. Make sure that the following parameters are enabled in the /conf/kyuubi-defaults.conf file of Kyuubi:
    kyuubi.engine.dli.set.conf.transform.to.annotation=true
  2. Add annotation parameters to the end of SQL statements.
    set Parameter
    Example:
    set dli.sql.current.database=tpch
    set dli.sql.shuffle.partitions=10

The execution result in the SQL Editor of DLI is as follows: The set parameters are changed to annotations and submitted to DLI for execution.

Figure 4 Viewing the configured parameters in the SQL Editor of DLI

Utilizamos cookies para mejorar nuestro sitio y tu experiencia. Al continuar navegando en nuestro sitio, tú aceptas nuestra política de cookies. Descubre más

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback