Connecting FineBI to AI DataLake Spark for Data Query and Analysis
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 intuitive charts and dashboards to swiftly gain data insights.
This section describes how to configure FineBI to connect to AI DataLake to access and analyze data in AI DataLake.
Preparations
- Environment requirements: Only Windows 10 and Windows 11 (64-bit) are supported.
- Toolkits:
- JDBC driver of AI DataLake: aidatalake-spark-jdbc-x.x.x.jar
- FineBI installation package: FineBI installation package
Step 1: Install FineBI and Configure Data Connections
- Download and install FineBI.
- Download the FineBI installation package.
- Find the downloaded FineBI installation program file.
- Double-click the installation program.
- 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.
- Configure FineBI to support custom drivers.
- Open the script for editing custom drivers.
Locate the edit script /webapps/webroot/WEB-INF/embed/finedb/db.script in the root directory of FineBI installation.
- Add the following content to the script:
INSERT INTO FINE_CONF_ENTITY VALUES('SystemConfig.driverUpload','true')If the file already contains the SystemConfig.driverUpload parameter, change its value from false to true.
- Restart FineBI for the modifications to take effect.
- Open the script for editing custom drivers.
- Integrate the JDBC driver with FineBI.
- Download the data driver.
Click aidatalake-spark-jdbc-x.x.x.jar to obtain the JDBC driver.
- Obtain Log4j JAR files.
Download the following Log4j dependency packages from the official Maven repository:
- log4j-api-2.xx.jar
- log4j-core-2.xx.jar
- log4j-slf4j-impl-2.xx.jar
- Integrate the AI DataLake driver into FineBI.
- Open FineBI.
- Choose Data Connection > Data Connection Management.
- Click Create. On the displayed page, select the AI DataLake JDBC driver from the Driver drop-down list box and click Upload File to upload Log4j JAR files. Figure 1 Installing a data connection driver for FineBI
- Download the data driver.
- Configure a database connection.
- Choose Data Connection > Data Connection Management.
- Click Create and then Other JDBC. Figure 2 Clicking Other JDBC
- Set connection parameters. Figure 3 Setting connection parameters
Table 1 Parameters for connecting FineBI to AI DataLake Parameter
Description
Username
Username used to log in to the server. Enter the AK of the Huawei Cloud account.
For details about how to obtain the AK and SK, see AK/SK Obtaining.
Password
Password used to log in to the server. Enter the SK of the Huawei Cloud account.
For details about how to obtain the AK and SK, see AK/SK Obtaining.
Encoding
Mode in which FineBI interacts with the target database.
Select UTF-8.
Data Connection URL
JDBC connection string The format is as follows:
jdbc:aidatalakespark://{endpointName}/{ProjectID}?aidatalake.workspaceId={workspaceId}&lakeformation.instanceId={lakeformationInstanceId}&endpointname={AIDataLake Spark Endpoint}®ionName={regionName}&catalog={catalogName}&obs.endpoint={ObsEndPoint}&fineBIDialect=CustomSparkDialectThe following table lists the parameters of the JDBC connection string.
Table 2 Parameters of the JDBC connection string Parameter
Description
Example Value
endpointName
URL of the AI DataLake service
An endpoint is the request address for calling an API. Endpoints vary depending on services and regions. For the endpoints of all services, see Regions and Endpoints.
https://aidatalake-test.cn-north-7.myhuaweicloud.com
ProjectID
AI DataLake project ID
Hover the cursor over the account information in the upper right corner of the AI DataLake console, click My Credentials, and obtain the project ID.
0b33ea2a7e******4c009bb05076d
workspaceId
AI DataLake workspace ID
Log in to the AI DataLake console and find the target workspace ID on the workspace management page.
spark
lakeformationInstanceId
LakeFormation instance ID
For how to obtain the ID, see
ae6dd098-***-*****-c02***def36d
regionName
Region name of AI DataLake
cn-north-7
catalogName
Data catalog name
- This parameter is mandatory when a LakeFormation catalog is used. Set it to the corresponding LakeFormation catalog name.
When querying a LakeFormation catalog, ensure that there is a default database in the catalog.
- If this parameter is not specified, an AI DataLake catalog is used. You do not need to configure this parameter when an AI DataLake catalog is used.
For example, if a LakeFormation catalog named lfcatalog is used, the configuration is as follows: catalog=lfcatalog.
ObsEndPoint
OBS endpoint
For how to obtain it, see Endpoints and Domain Names.
-
- This parameter is mandatory when a LakeFormation catalog is used. Set it to the corresponding LakeFormation catalog name.
- Click Save.
Step 2: Create a Custom SQL Query
- Choose Public Data. Click Add Dataset and select SQL Dataset. Figure 4 Opening a data connection
- Select Data from Data Connection.
- Enter a custom SQL query statement to start data analysis. Figure 5 Custom SQL query statement
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot