Smartbi
Smartbi is compatible with AnalyticDB for MySQL. The following test results confirm that Smartbi can connect to an AnalyticDB for MySQL cluster, list databases, and query table schema and data.
Prerequisites
Before you begin, ensure that you have:
A Smartbi account
An AnalyticDB for MySQL cluster with a database and at least one table
Smartbi connected to your AnalyticDB for MySQL cluster (see Connect Smartbi to AnalyticDB for MySQL)
Test scope
All of the following operations were tested and passed:
Connect to an AnalyticDB for MySQL database.
In the Create Relational datasources dialog box, configure the following parameters:
Driver Type: Select aliyun AnalyticDB.
Driver Directory: Select Built-in.
Driver Class:
com.mysql.jdbc.Driver.Connection String:
jdbc:mysql://<host_address>?useUnicode=true&characterEncoding=UTF-8.Authentication Type: Select Static.
Enter your Username and Password.
Click Test Connection(T). When the "Test passed!" message appears, click Save(S) to complete creating the data source.
List databases.
On the DMS Database Management page, move the required databases from the Available Database Resources list to the Selected Database Resources list, and click Save(S). A "Save successful!" confirmation message appears.
Query the schema of a table.
The data quick-view page shows the structure of the selected table (for example, Hot Websites (
t_hot_site)). The Data Structure tab is selected, and the table contains the following field definitions:c_id: INTEGER
c_Sites (Website): STRING
c_match (Competition Attendance): DOUBLE
c_infring (Infringement Count): DOUBLE
c_compliance (Compliance): DOUBLE
c_date (Date): DATE
c_zdate (Week): DATE
c_tz (Notice): INTEGER
c_pp (Match): INTEGER
c_hdbt (Activity Title): INTEGER
c_tgwz (Hosted Website): INTEGER
Query the data of a table.
On the DMS data quick-view page, select the Data Preview tab to view data of the selected table (for example,
t_hot_site(Hot Websites)). The table columns include: c_id, Website, Competition Attendance, Infringement Count, Compliance, Date, Week, Notice, Match, Activity Title, and Hosted Website. The preview area shows only the first 20 rows of data. If you are not authorized, only masked data is displayed. After your authorization request is approved, you can view the actual data.