Before starting an interactive session in ChatBI, you must use a dataset to define the scope of data for analysis. A dataset can be a table from a target data source or a local file.
Prerequisite
A serverless resource group has been created in the region where you use ChatBI.
Usage notes
For datasets from a data source, only Hologres, MaxCompute, StarRocks, and MySQL data sources are supported.
For datasets from local files, only the
xls,xlsx, andcsvformats are supported. You can upload a maximum of 10 files, and each file cannot exceed 1 GB in size.Workspace members with any role can create and use datasets from DataWorks data sources. Previously, only workspace administrators had this capability.
Create a dataset
Go to the ChatBI page.
Log in to Alibaba Cloud and open the ChatBI Intelligent Data Insights page. Select the access point that matches the region of your DataWorks resources, such as your dataset and serverless resource group.
In the left-side navigation pane, click Dataset to go to the Datasets page. Then, click Create Dataset.
On the Create Dataset page, configure the following parameters:
If the dataset type is Data Source:
Parameter
Description
Basic Information
Name
Enter a custom name for the dataset.
Type
The type of the dataset. Valid values:
Data Source
Local File
Select Data Source.
Data Source Type
The type of the data source. Valid values:
Hologres
MaxCompute
StarRocks
MySQL
Data source information
The configuration parameters vary by data source type.
For example, for Hologres, you must configure Region, Hologres Instance, and Database Name.
Resource Group
Select a DataWorks serverless resource group, which is used to access the data source for data queries in subsequent sessions.
Test Network Connectivity
Test the network connectivity between the selected DataWorks serverless resource group and the data source.
Semantic Analysis
(Displayed only when the data source type is MaxCompute) Specifies whether to enable semantic analysis for the dataset. After you select Enable Semantic Analysis, when you create or edit a dataset and save it, the platform automatically creates or updates a semantic task to parse the data tables in the dataset. This enables semantic knowledge recall in ChatBI sessions, improving the accuracy of Q&A responses. After this feature is enabled, a Semantic Analysis tab is displayed on the dataset details page. This option is selected by default when you create a dataset.
Select Destination Table
Select destination tables
After you complete the Basic Information configuration, click Next to go to the Select Destination Table step.
In the To Be Selected list, select the destination tables and click
to add them to the Selected list. The selected tables are added to the current dataset.If the dataset type is Local File:
Parameter
Description
Basic Information
Name
Enter a custom name for the dataset.
Type
The type of the dataset. Valid values:
Data Source
Local File
Select Local File.
Upload local files
Only the
xls,xlsx, andcsvformats are supported. You can upload a maximum of 10 files, and each file cannot exceed 1 GB in size.
After you complete the dataset configuration, click Next to go to the Data Insight step. The system automatically scans the dataset to extract data value characteristics, which improves the accuracy of analysis during sessions.
Data insight may take a long time. You can click Completed directly and view the results in the dataset later.
View a dataset
In the left-side navigation pane, click Dataset to go to the Datasets page.
Find the destination dataset card and click it to go to the dataset details page.
For MaxCompute datasets with Semantic Analysis enabled, the dataset card displays the semantic parsing status, which can be Waiting for Semantic Parsing, Semantic Parsing in Progress, Semantic Parsing Completed, or Semantic Parsing Failed.
On the dataset details page, the top displays the basic information of the dataset (including the type, number of tables/files, and creator), the left side displays the list of tables/files, and the right side displays the basic information and a data preview of each table/file (up to 20 records can be previewed).
View semantic analysis results
For MaxCompute datasets with Semantic Analysis enabled, after you go to the dataset details page, you can click the Semantic Analysis tab to view the semantic task status and parsing results.
The Semantic Analysis tab is displayed only when the dataset meets both of the following conditions: the dataset uses a MaxCompute data source, and Enable Semantic Analysis was selected when the dataset was created or edited.
The Semantic Analysis tab has the following layout:
Status bar (top): Displays the current semantic parsing status and sync status. Semantic parsing statuses include Semantic Parsing in Progress, Semantic Parsing Completed, and Semantic Parsing Failed.
Result Files (left pane): Lists the result files generated by semantic parsing, including the index file (
_index.json) and semantic model YAML files. Click a file name to view its content in the right pane.Content viewer (right pane): Displays the detailed content of the selected file. For semantic model YAML files, the content viewer provides two views:
Semantic Graph: Displays the relationships between data tables and metrics in the semantic model as a visual graph, along with statistics such as the number of tables and metrics.
YAML Source: Displays the raw content of the semantic model YAML file with line numbers, allowing you to review field definitions, metric formulas, and business descriptions in the model.
You can perform the following operations on the Semantic Analysis tab:
Button | Description |
Rerun | Triggers the semantic parsing task again. Use this when the table structure in the dataset has changed and the semantic model needs to be updated. |
Refresh | Refreshes the semantic parsing status and the result file list. |
Download | Downloads the selected semantic model YAML file to your local machine. This button is available only after semantic parsing is completed. |
For detailed information about semantic analysis (including the YAML structure of semantic models and how to use semantic graphs), see Data Agent semantic analysis.
Edit a dataset
In the left-side navigation pane, click Dataset to go to the Datasets page.
Find the destination dataset card. You can use either of the following methods to go to the dataset edit page.
Hover over the destination dataset card and, in the upper-right corner of the card, click .
Click the destination dataset card to go to the dataset details page, and click the Edit button in the upper-right corner.
Modify the dataset configuration. The parameter descriptions are the same as those in Create a dataset.
NoteWhen you edit an existing dataset configuration, the type and data source type cannot be modified.
After you complete the dataset edit, click Next to go to the Data Insight step. Data insight is performed again on the data in the dataset.
Delete a dataset
In the left-side navigation pane, click Dataset to go to the Datasets page.
Hover over the destination dataset card and, in the upper-right corner of the card, click . After the dataset is deleted, the associated sessions and charts cannot display data properly.
Next steps: Start a session based on a dataset
You can use either of the following methods to start a session based on a specific dataset.
In the left-side navigation pane, click Dataset to go to the Datasets page. Hover over the destination dataset card and, in the upper-right corner of the card, click
to start a session.In the left-side navigation pane, click New Session to open the ChatBI session window. Then, in the session window, click Select Dataset.
On the Chat page, enter your requirements or questions to start data analysis. For more information, see ChatBI sessions.
NoteIf the session uses a dataset with Semantic Analysis enabled, ChatBI automatically performs semantic knowledge recall during Q&A to improve analysis accuracy. If the dataset is still being parsed, you can start asking questions first. For complex questions, we recommend that you ask them again after parsing is completed to get more accurate answers.