Standard data tables
This topic describes how to upload, configure, and update standard data tables, including MySQL and Excel tables. This allows your chatbot to answer questions based on your MySQL or Excel files.
Use cases
This feature is ideal for structured data sources, such as Excel spreadsheets or MySQL databases. For example, if you run a clothing store and receive a detailed inventory list from a supplier, which typically includes each item's name, quantity, unit price, and size. You can import this Excel list into the system and configure it. Afterward, you can ask the chatbot questions like, "Do you have this shirt in size M?" or "Is this shirt available in black?" The chatbot then uses this imported data to provide quick and accurate answers.
Add a data table
Single table limit: A single table can have a maximum of 100 columns and 10,000 rows. The file size cannot exceed 50 MB.
Batch upload limit: You can upload a maximum of 20 table files at once. The total size of all files cannot exceed 400 MB.
Your resource quota depends on your Chatbot (Tongyi Edition) plan. For example, the Enterprise Edition (Tongyi Edition) allows you to import up to 50 tables. For more information about resources, see product billing.
Bind an existing data table
Binding an existing data table links a table that you have already created in a business space to your chatbot.
In your robot space, go to knowledge base > table management > data table management. Select standard data table to open the data table management page. In the upper-right corner, click Bind Existing Data.
In the dialog box that appears, select the table you want to bind and click OK.

Upload a local Excel table
On the standard data table page, click New Data Table.
In the New Data Table window, select Excel table as the data source.

Enter a name and description for the data table. Select a table type and click Upload Local File to import your Excel file.
Standard table: Use this option for basic tables with a single header row where each column is independent.
Complex table: Use this option for tables with complex header structures that require intelligent analysis for identification.
NoteNotes on uploading data tables:
The first row of the table serves as the table header. The header cannot be empty, and multi-row headers are not supported.
Data table names and header names can contain Chinese characters, English letters, and numbers, but not special characters, spaces, or line breaks.
If the file contains multiple sheets, the system reads data only from the first sheet.
The table can have a maximum of 10,000 rows and 100 columns. The file size cannot exceed 50 MB. The text in a single cell cannot exceed 10,000 characters.
When you upload an updated table, the system verifies that the name of the first sheet in your file matches the data table name on the product page. If they do not match, the upload fails.
Import from a MySQL database
On the standard data table page, click New Data Table and select Database > MySQL as the data source.
Configure the settings based on your requirements, including the data table name, update time column, data source, and physical table.
Data source: A data source created in table management > data source management. Currently, only MySQL databases are supported.
Physical table: The specific data table within the database.
Update time column: The column in the physical table that records the last data update time.
NoteThe system uses the Update time column to check for data updates in real time. If your queries require high data freshness, include a column in your table that tracks the last update time. Select this column from the Update time column drop-down list so the system can promptly read the latest data and automatically synchronize metadata.

Edit a data table
After adding a table, click Edit and select the Field Configuration tab to edit the table headers.
NoteCurrently, you can only configure the table header fields. You cannot modify data within the data table.
Q&A Configuration includes settings for Clarification Order and Context Parameter. These settings are used to manage the table's response and recognition behavior. For more information, see data Q&A intervention.
Header and Value Intervention includes settings for header synonyms, value synonyms, and Context Parameter. This feature manages the recognition of table headers. For more information, see data Q&A intervention.

Edit the header fields as needed:

Edit a field: This includes settings for the field's English name, Chinese name, field type/output format, and description.
Field English Name: If the data source is a database, this is the field name from the database. If the data source is an Excel file, the system automatically translates the Chinese field name into English.
Field Chinese Name: An explanation of the field's meaning. This directly affects information retrieval and question-answering performance, so ensure that the name is accurate.
Field Type/Output Format: The output format for the field in the chatbot's answers. The following field types are supported:
Numeric range format: The first number must be less than the second. Values must be numbers or decimals. Thousands separators are not supported. Example: [10000, 20000].
Numeric array format: Values must be numbers or decimals. Thousands separators are not supported. Example: [3000, 10000, 20000].
Date range format: The first date must be earlier than the second date. The supported date formats are "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd", "yyyy/MM/dd", and "yyyy年MM月dd日". You cannot use different formats for the same field. Example: ["2023-11-01 00:00:00", "2023-11-11 00:00:00"].
Date array format: The supported date formats are "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd", "yyyy/MM/dd", and "yyyy年MM月dd日". All dates for the same field must use a consistent format. For example, ["2023-11-01", "2023-11-11", "2023-10-22"].
Text array format: All elements must be text enclosed in double quotation marks. Example: ["Excellent performance", "Stable and reliable", "Ready to use", "Elastic scaling"].
Field Description: An explanation of the header field's meaning, purpose, or usage notes. This field affects question-answering performance, so ensure that the description is accurate.
Associated Field: Allows you to associate tables using foreign keys. This enables the chatbot to answer a single question by querying multiple data tables. For example, you can query a student's ID from a basic information table and their insurance number from an insurance table.
Full-text Index: When enabled, the system compares user questions against the field's content to find relevant information.
Delete Header: Deletes the corresponding column.
Header and Value Intervention: Manages the recognition capability for a specific table header. This includes settings for header synonyms, value synonyms, and Context Parameter. For more information, see data Q&A intervention.
Update a table
Update from a local file
On the table update page, click Update Data and upload the updated table. When you upload the table, the system verifies that the name of the first sheet in your file matches the data table name on the product page. If they do not match, the upload fails.

Update from a database
Field synchronization
When you add or delete fields in the database, you can use the Sync Fields feature. The system automatically detects field changes in the database, and you can choose to synchronize these metadata changes. To do this:
Go to table management > data table management, find the relevant table, and click Edit.
Click Sync Fields and confirm the field changes to synchronize.

Incremental data update
When data in the bound database table changes, you can configure an update time column so the system can quickly and automatically synchronize updated data. To configure this feature:
In your database, configure an "update time" column in the physical table. When you modify data in a row, record the modification time in this column.
NoteYou must perform this step in your database's physical table.
In the table editing interface, bind the corresponding update time column.

Full data update
A full data update reads the entire configured database table. Full synchronization is suitable for scenarios where the database content has been extensively updated. This process can be time-consuming and resource-intensive, so we recommend using it only when necessary. To perform a full synchronization, go to table management > data table management, find the data table, click the Full Synchronization button next to it, and confirm the operation.

Manage activation status
Inactive: The chatbot does not use the data table in the Q&A process.
Active: The chatbot uses the data table in the Q&A process.


