Datasets (formerly Data Connections) are the unified entry point for Alibaba Cloud Model Studio RAG to manage external data sources. By creating a dataset, applications can securely access data in enterprise databases, document systems, and object storage, and query and reference the data in real time during conversations.
This page describes Knowledge (formerly RAG) datasets (formerly Data Connections). The new Connector for agent scenarios is now available, supporting more connectable systems and MCP-based invocation by agents. Migrate legacy data connections before September 30, 2026 by following Data connection migration.
Datasets are the unified entry point for Knowledge (formerly RAG) to manage external data sources. When you create a dataset, you select a dataset type based on the data source. Applications can then securely access data in enterprise databases, document systems, and object storage, and query and reference the data in real time during conversations.
Datasets fall into two main categories based on how data is stored and accessed — platform-hosted and stream processing — with three dataset types in total:
Format
Dataset type
Storage
Scenarios
Platform-hosted
File
Alibaba Cloud Model Studio or your own OSS
Upload and manage unstructured documents (PDF, Word, Markdown, etc.), with support for local upload and continuous synchronization from external sources such as Lark, DingTalk, SharePoint, Yuque, and OSS
Table
Alibaba Cloud Model Studio or your own OSS
Import and query structured tabular data, such as CSV and Excel.
Stream processing
Database
Data remains in the source database for real-time access.
Connect to MySQL, PostgreSQL, or PolarDB-X 2.0 databases and execute SQL queries (supported only for data sources imported with DMS).
Yuque, OSS, DingTalk, Lark, and SharePoint are not created as standalone dataset types. They serve only as import and synchronization sources for file datasets. For details, see Data synchronization rules below.
Before you create a dataset, ensure you meet the following prerequisites:
Account permissions: You must use a root user or a RAM user with permissions to manage datasets. A root user must authorize a RAM user before they can use the dataset feature. For details, see Permission Management.
Data source preparation:
File/Table dataset: You must have documents or spreadsheets ready for upload, or have an existing OSS Bucket.
MySQL database: You must have a MySQL database instance (Alibaba Cloud RDS or self-managed). Ensure the instance is accessible via a public or private network.
PostgreSQL database: You must have a PostgreSQL database instance with its wal_level parameter set to logical.
PolarDB-X 2.0 database: You must have an Alibaba Cloud PolarDB-X 2.0 instance in a region that supports private network access. If you plan to import the data source using DMS, you must first register the PolarDB-X instance in DMS.
Yuque sync source: You must have a Yuque Knowledge Base and a Personal Access Token. Only the public version of Yuque is supported.
Go to the Dataset page and click Create in the upper-right corner.
Enter a dataset name (up to 20 characters) and a description (up to 200 characters). The description guides how accurately agents call the dataset, so include the data content and purpose.
Select a dataset type (File, Table, or Database), and then configure the settings for that type:
File
Table
MySQL
PostgreSQL
PolarDB-X 2.0
A file dataset is used to manage unstructured documents (such as PDF and Word) and supports local upload and continuous synchronization from external sources such as Lark, DingTalk, SharePoint, Yuque, and OSS.
Select File for the dataset type.
Select a storage location:
Use Platform Storage: Data is stored in the storage space provided by Alibaba Cloud Model Studio. This option offers a limited-time free quota of up to 200,000 files and 1 TB of storage.
Use Your Own OSS Storage: Data is stored in your own OSS bucket. This option is suitable for large-scale data storage.
If you are using this option for the first time, follow the on-screen instructions to complete the authorization.
The target bucket must have the bailian-connector-access tag with the value ReadAndWrite to allow access from Alibaba Cloud Model Studio. Add tag
A table dataset is used to manage structured data, such as CSV and Excel files.
Select Table for the dataset type.
Select a storage location:
Use Platform Storage: Data is stored in the storage space provided by Alibaba Cloud Model Studio. This option provides a 1 TB free quota. After the quota is used up, billing automatically switches to pay-as-you-go. This option is suitable for small-scale data storage.
Use Your Own OSS Storage: Data is stored in your own OSS bucket. This option is suitable for large-scale data storage.
If you are using this option for the first time, follow the on-screen instructions to complete the authorization.
The target bucket must have the bailian-connector-access tag with the value ReadAndWrite to allow access from Alibaba Cloud Model Studio. Add tag
A MySQL database dataset is a stream processing dataset. It connects to a MySQL database, allowing applications to execute SQL queries and retrieve real-time data.
Only MySQL datasets created using the import from DMS data source method support SQL query execution; those created with the create custom data source method do not.
Select Database for the dataset type, and select MySQL for the database type.
Configure Data Source Information:
Create custom data source: Manually configure the connection to an Alibaba Cloud RDS for MySQL instance or a self-managed MySQL database. You can connect over a public or private network.
Alibaba Cloud RDS for MySQL: Authorize access by using a Service-Linked Role (SLR) to associate the dataset with a MySQL database in Alibaba Cloud RDS. After you select this option, the database address and port are automatically populated based on the instance ID.
Self-managed MySQL: Manually configure the connection details for a remote self-managed MySQL database. You must enter the database address and port.
Import from DMS data source: Quickly import a data source that is already configured in Data Management Service (DMS). The first time you use this option, you must complete the SLR authorization for the EventBridge, RDS, and DMS service management roles.
Select network type:
Public network (Default): Connect to the database over the public network. When you select this option, you must add the specified IP address range to the allowlist of your database instance.
Private network: Connect to the database over an internal network. You must also select the region. This option is recommended for production environments because it provides a more stable and secure connection.
Enter database connection information:
Parameter
Description
Database instance
Displayed only for Alibaba Cloud RDS for MySQL. Enter the RDS instance ID, for example, rm-******adq7.
Database address
For Alibaba Cloud RDS for MySQL, this parameter is automatically populated and the input is disabled. For self-managed MySQL, you must enter it manually.
Database port
For Alibaba Cloud RDS for MySQL, this parameter is automatically populated with 3306 and the input is disabled. For self-managed MySQL, you must enter it manually.
Database username
Required. Enter the username for the database connection.
Database password
Required. Enter the database password. The corresponding user must have read permissions on the database.
(Optional) Click Start Test to verify the database connectivity.The system uses EventBridge to test connectivity, and the test is free of charge. After the test is successful, you can select the target database from the Select DB drop-down list.
After a dataset is created, its database connection information, including the database password, cannot be modified. If you change the database password in the RDS console, the password saved in the dataset becomes invalid, data synchronization stops due to an authentication failure, and the knowledge base data is no longer updated. In this case, delete the original dataset and create a new one with the new password. Because a knowledge base cannot change its associated dataset, you must also re-create the associated knowledge base.
A PostgreSQL database dataset supports connections to Alibaba Cloud RDS for PostgreSQL instances and self-managed PostgreSQL databases.
Only PostgreSQL datasets created using the import from DMS data source method support SQL query execution; those created with the create custom data source method do not.
Prerequisites
The database account must have high-level permissions (Superuser or REPLICATION permissions).
The instance system parameter wal_level must be set to logical (the default is 'replica').
(For self-managed instances only) You have configured the listen_addresses parameter to allow access from the 100.64.0.0/16 CIDR block. To do this:
Edit the configuration file: sudo vim /etc/postgresql/[version]/main/pg_hba.conf
Add the following rule to the top of the file: host [database_name] [username] 100.64.0.0/16 md5
Reload the configuration: sudo systemctl reload postgresql
Select Database for the dataset type, and select PostgreSQL for the database type.
Configure database connection:
Host Address: The connection address (public or private) of the database instance.
Port: The default is 5432.
Database Name (dbName): Required. Specify the database to connect to.
Username: A database account with high-level permissions.
Password: The database password.
Click Test Connectivity to ensure the configuration is correct. The PostgreSQL dataset uses Data Transmission Service (DTS) to test connectivity.
Comparison between MySQL and PostgreSQL datasets:
Difference
MySQL
PostgreSQL
Default port
3306
5432
Additional required fields
None
Requires dbName (database name)
Connectivity test service
EventBridge
Data Transmission Service (DTS)
Special configuration requirements
None
Requires setting the instance system parameter wal_level to logical
A PolarDB-X 2.0 database dataset is a stream processing dataset. It connects to an Alibaba Cloud PolarDB-X 2.0 distributed database, allowing applications to execute SQL queries and retrieve real-time data.
Only PolarDB-X 2.0 datasets created using the import from DMS data source method support SQL query execution; those created with the create custom data source method do not.
Select Database for the dataset type, and select PolarDB-X 2.0 for the database type.
Configure Data Source Information:
Create custom data source: Authorize access using a Service-Linked Role (SLR) to associate the dataset with an Alibaba Cloud PolarDB-X 2.0 database. The database address and port are automatically populated based on the selected instance and cannot be manually entered.The first time you use this option, you must authorize two Service-Linked Roles in the pop-up window: the DTS service management role (AliyunServiceRoleForSFMConnectorAccessDTS) and the PolarDB-X service management role (AliyunServiceRoleForSFMAccessPolarDBX).
Import from DMS data source: Quickly import a PolarDB-X data source that is already configured in Data Management Service (DMS). The first time you use this option, you must complete the SLR authorizations for the DMS, DTS, and PolarDB-X service management roles.
Select network type: Only private network is supported. You must select a region to connect to the PolarDB-X instance over an internal network. This option is suitable for production environments.
Enter database connection information:
Parameter
Description
Database instance
Displayed only for the create custom data source method. From the drop-down list, select a PolarDB-X 2.0 instance under the current account in the selected region.
Select Data Source
Displayed only for the import from DMS data source method. From the list of DMS data sources, select one PolarDB-X data source. DMS ensures the connectivity of the data source.
Database address
This field is automatically populated based on the selected instance and input is disabled when using the create custom data source method. When using the import from DMS data source method, you must manually enter or confirm the address.
Database port
This field is automatically populated based on the selected instance and input is disabled when using the create custom data source method. When using the import from DMS data source method, you must manually enter or confirm the port.
Database username
Required. Enter the username for the database connection.
Database password
Required. Enter the database password. The corresponding user must have read permissions on the database.
(Optional) Click Start Test to verify the database connectivity. After the test is successful, you can select the target database from the Select DB drop-down list.
Key differences from the MySQL dataset:
Network type: Only private network connections are supported.
Data source: Supports only Alibaba Cloud PolarDB-X 2.0 instances, not self-managed databases.
SLR Authorization: The first time you use this dataset, you must explicitly authorize the DTS and PolarDB-X service management roles (and the DMS role if using the DMS method) in the pop-up window.
Click Details on the file dataset card to open the file management page.
In the Category pane on the left, select an existing category or click the + icon to create a new one.
Alibaba Cloud Model Studio manages imported files by category.
Each workspace supports a maximum of 500 categories. To request a higher category limit, submit a ticket.
Click Import Data to open the Import Data page. For the import method, select Upload Local File.
The platform does not support importing JSON, CSV, or YAML files directly. Convert them to XLSX or XLS format before importing.
For Parsing Method, select Default Settings or Custom Settings. (Custom Settings lets you configure parsing rules for different formats to improve parsing results).
Parsing method details
Configure the parsing strategy based on your needs. If you are unsure, use the default settings. For details on Intelligent Document Parsing, LLM Parsing, and Digital Parsing, see document understanding.
The available parsing methods depend on the selected file type (document, image, audio, and video).
Digital Parsing: Cannot parse illustrations and charts in files.
Intelligent document parsing: The parser identifies and extracts text from illustrations and then generates text summaries. These summaries, along with other non-image content, are chunked, converted into vectors, and used for knowledge base retrieval.
Large model document parsing: Enables agents that use a model from Select Model to answer questions about illustrations and charts in a file. Select LLM Parsing to recognize and understand this type of content.
Qwen-VL parsing: Supports only image formats. You can select a Qwen-VL model and use a prompt to specify the layout, elements, and content for recognition. Its other features are the same as those of large model document parsing.
Audio/video parsing: Performs speech recognition, video frame extraction (for videos only), and plot analysis (for videos only) on the file, then structurally aligns all audio and visual information on a timeline.
Speech recognition: The subtitle content parser uses Speech File Transcription to convert human speech into text. It cannot recognize music or environmental sounds, such as horns, bells, or thunder.
Video frame extraction: Extracts representative visual frames from the original video and generates corresponding text descriptions.
Plot analysis (must be enabled manually): Analyzes video content to identify specific events, marks them with timestamps, and generates corresponding text descriptions.
(Optional) Configure Tags for the file.
When you call an application by using an API, you can specify tags in the tags request parameter. When searching the knowledge base, the application first filters relevant files based on the tags to improve retrieval efficiency. For an agent application (Agent 1.0), you can set tags in the console when you debug the knowledge base.
Click Confirm. The system starts parsing and importing the file. You can track the task progress on the page.
The file will be converted into a format that Alibaba Cloud Model Studio can process. Processing may take several hours during peak times. Please be patient.
During peak traffic or high concurrency, file parsing may take longer due to resource queuing, and occasional parsing timeouts may occur. Please wait patiently or try again later.
After the import is complete, click Details next to the file to view it.
Once imported into Alibaba Cloud Model Studio, files are stored as independent copies, unlinked from the original data, in the free storage space provided by the platform. This space currently has no capacity limit.
You can only view files imported within the last 90 days. Files older than this period cannot be viewed, but they will not be deleted.
Imported files can be used only by users in the current workspace. Alibaba Cloud Bailian will not use the files for any commercial purposes or disclose them publicly.
Click Details on the table dataset card to open the data management page.Under data table management on the left, select an existing data table or click the + icon to create a new one.
Alibaba Cloud Model Studio uses data tables to manage imported data.
New data table
Existing data table
Enter a Table Name. Then, configure the data table by selecting either Upload excel directly or Custom Header.
Upload excel directly: Alibaba Cloud Model Studio automatically detects the table header in your uploaded file to create the data table structure. Alibaba Cloud Model Studio then imports the remaining content as data records.
Custom table header: The Column Name and Type parameters are required, while the Description parameter is optional.
The structure of a data table, including its column names, description, and type, cannot be modified after creation.
The structure of the uploaded file must exactly match the structure of the target data table, including the number of columns and column names, or the import will fail. For example, if the target data table has two columns, you must configure two fields with matching column names. You can add or remove fields by clicking Add field or Delete in the Actions column.
To help the model understand the meaning of each field (for example, that age indicates age), provide a clear natural language description in the Description field.
If a field type is set to image_url, ensure the link is a publicly accessible image URL. The knowledge base uses this link to fetch the image and generate a vector index for it, to support scenarios such as image search.
Example image_url format: https://example.com/downloads/pic.jpg
When you create a knowledge base, fields of the image_url type are used to generate an image index. Alibaba Cloud Model Studio accesses the target image, extracts its features, and then converts them into a vector using image embedding and stores it. When a user searches the knowledge base, this vector is compared with the vector of their uploaded image to determine similarity.
Click the Upload icon to select and upload a file in XLSX or XLS format.
The file must contain a table header, or the import will fail.
The platform does not currently support the direct import of JSON, CSV, or YAML files. Please use an appropriate tool to convert them to XLSX or XLS format before importing.
Click OK to begin the import. After the import is complete, the new data table appears in the Table navigation tree on the left.
In the Table list on the left, select the target data table, and then click Import Data.
For the import type, select either Upload and Overwrite or Incremental Upload.
Click Download Template to obtain a blank file that contains only the table header. You can add new data directly to this file and then use it for an overwrite or incremental upload.
Click the Upload icon to select and upload a file in XLSX or XLS format.
The file must contain a table header, and its structure must match that of the current data table, or the import will fail.
The platform does not support importing JSON, CSV, or YAML files directly. Please convert them to XLSX or XLS format using a suitable tool before importing.
File dataset or table dataset: Click Details on the card to open the file or table management page.
In the Category pane on the left, select an existing category or click the + icon to create a new one.
Model Studio (Bailian) uses categories to manage imported files.
Each workspace supports a maximum of 500 categories. To request a higher category limit, submit a ticket.
Click Import Data to open the Import Data page. For Import Method, select OSS.
When you import data from OSS into Model Studio (Bailian) for the first time, you must follow the on-screen instructions to grant the required permissions. Also, add the bailian-datahub-access tag to the target bucket to grant access to Model Studio (Bailian).
Buckets that use the Archive, Cold Archive, or Deep Cold Archive storage classes are not supported.
Model Studio (Bailian) cannot access files in the root directory of a bucket. Select an existing subdirectory or create a new one for Model Studio (Bailian) to access.
Buckets with content encryption enabled are supported. Private buckets are supported.
For Parsing Method, select Default Settings or Custom Settings. With Custom Settings, you can configure parsing rules for different formats to improve parsing performance.
Parsing methods
Configure the parsing strategy based on your needs. If you are unsure, we recommend using the default settings. For detailed information about Intelligent Document Parsing, LLM Parsing, and Digital Parsing, see document understanding.
Digital Parsing: This method does not parse illustrations or charts in files.
Intelligent Document Parsing: The parser identifies and extracts text from illustrations in a file and then generates text summaries. These summaries, along with other non-image content, are chunked and converted into vectors for knowledge base retrieval.
Large model document parsing: Applications that use the model specified in Select Model allow users to ask questions about the content of illustrations and charts in files. To recognize and understand illustrations and charts in files, select LLM Parsing.
Qwen-VL Parsing: Supports only image formats. You can select a Qwen-VL model and use a prompt to specify the layout, elements, and content for the model to recognize. In other respects, it is the same as large model-based document parsing.
Audio and Video Parsing: Performs speech recognition, video frame extraction (for videos only), and scene analysis (for videos only) on the file, and then aligns all audio and visual information structurally on a timeline.
Speech Recognition: The parser uses Speech File Transcription to convert human speech into text. It does not currently support the recognition of music or environmental sounds, such as horns, bells, or thunder.
Video Frame Extraction: Extracts representative visual frames from the original video and generates corresponding text descriptions.
Scene Analysis (must be enabled manually): Analyzes the video content to identify specific events, marks them with timestamps, and generates corresponding text descriptions.
(Optional) Configure Tags for the file.
When you call an application by using an API, you can specify tags in the tags request parameter. The application then filters files by these tags during knowledge base searches, improving retrieval efficiency. For an agent application (Agent 1.0), you can set tags when you edit the application in the console (by enabling Knowledge Base>Advanced ConfigurationFilter by Tag).
Click Confirm. The system begins to parse and import the files. You can monitor the progress on the page.
The files are converted into a format that Model Studio (Bailian) can process. This process might take several hours during peak times, so please be patient.
After the import is complete, click Details next to a file to view its contents.
After a file is imported, Model Studio (Bailian) stores it as a standalone copy unlinked from the original data. The platform saves this copy in free storage space, which currently has no capacity limit.
Imported files are accessible only to users within the current workspace. Model Studio (Bailian) does not use your data for any commercial purposes or make it publicly available.
Before you create a data source, you must enable the EventBridge service.
Model Studio (Bailian) and the RDS instance must belong to the same Alibaba Cloud account. Otherwise, follow the steps in Import data from a self-managed MySQL database.
When importing a large table (over 1,000,000 rows), the process may take longer than the database's log retention period. This can lead to duplicate data imports. Learn how to resolve this.
RDS instance limitations: Only the MySQL engine is supported, with no version restrictions. Other engines, such as PostgreSQL, are not supported. The instance can be in any region. Only basic edition and high-availability edition instances are supported. When you create an RDS instance, set the network type to VPC and select Yes for the whitelist option to add the VPC network segment to the instance's whitelist.
Database and table limitations: A knowledge base can be associated with only a single table in a database; multi-table joins are not supported. The associated table can contain a maximum of 10,000,000 rows, and each row cannot exceed 100 KB. Data in rows exceeding this size limit will be truncated.
For Network Type, select Public Network or Private Network.
Private network data sources are supported only for RDS instances in specific regions. For other regions, select a public network data source. Private network data sources offer better security and performance.
Public network
Private network
To allow your knowledge base to receive data from the RDS instance, add the EventBridge public IP addresses to the instance's whitelist.
If the whitelist is not configured correctly, a Communications link failure error is displayed when you create the data source.
How to configure the EventBridge whitelist
Go to the RDS console. In the navigation pane on the left, click Instance List, and then click the target RDS instance. In the navigation pane on the left, click Database Connection, and then click Configure Whitelist next to the public endpoint.
Click Add Whitelist Group and add all of the following EventBridge public IP addresses to the group.
Configure the following parameters for the data source:
Parameter
Description
Data Source Name
The data source name must be unique within a workspace. This name cannot be reused, even if the data source creation fails.
Database Instance
Enter the ID of the RDS instance. To find the ID, go to the RDS console and click Instance List in the navigation pane on the left.
Database Endpoint
Enter the public endpoint of the RDS instance. You can obtain this information from the Database Connection page of the RDS instance: Go to the RDS console, click Instances in the left navigation bar, and then click the RDS instance that contains the data table. Then, click Database Connection in the left navigation bar to view the public endpoint for the instance.
If a public endpoint is not enabled for the RDS instance, follow the on-screen instructions to enable it.
For high-availability edition RDS instances, do not use the proxy endpoint or internal endpoint from the database proxy connection section.
Database Port
Enter the public port for the RDS instance. This information is also available on the Database Connection page.
Database Username
We recommend using a privileged account. You can also use a standard account that has DML and DDL permissions on the target database. For information on account requirements and creation instructions, see Create an account.
Click Create Data Source. The system will then automatically configure the RDS data source. During this time, the workspace is locked, and you cannot create other data sources simultaneously.
When you submit the task for the first time, you may be prompted to authorize the EventBridge service-linked role. A root account must perform this action. If you need to use a RAM user, the root account must first grant the necessary permissions to the RAM user.
Creating a data source may take several minutes during peak hours.
Status
Description
Creation Successful
The data source was created successfully. Select the data source and proceed to thenext step.
Creation Failed
The data source creation failed. Verify your parameters, correct them if necessary, and then clickRetry. You can also click Delete to remove the failed data source.
Configure the following parameters for the data source:
Parameter
Description
Data Source Name
The data source name must be unique within a workspace. This name cannot be reused, even if the data source creation fails.
Region
Select the region where the RDS instance is located. To find this, go to the RDS console and click Instance List in the navigation pane on the left.
Database Instance
Enter the ID of the RDS instance. To find the ID, go to the RDS console and click Instance List in the navigation pane on the left.
Database Endpoint
Enter the internal endpoint of the RDS instance. You can obtain this information from the Database Connection page of the RDS instance: Go to the RDS console, click Instance List in the left navigation bar, and then click the RDS instance that contains the data table. Next, click Database Connection in the left navigation pane to view the internal endpoint for the instance.
For high-availability edition RDS instances, do not use the proxy endpoint or internal endpoint from the database proxy connection section.
Database Port
Enter the internal port for the RDS instance. This information is also available on the Database Connection page.
Database Username
We recommend using a privileged account. You can also use a standard account that has DML and DDL permissions on the target database. For information on account requirements and creation instructions, see Create an account.
Run a connectivity test: Click Start Test to verify the connection between Model Studio (Bailian) and your data source.
When you run the test for the first time, you may be prompted to authorize the EventBridge service-linked role. A root account must perform this action. If you need to use a RAM user, the root account must first grant the necessary permissions to the RAM user.
VPC ID
Enter the VPC ID of the RDS instance. You can find this on the Database Connection page of the instance.The VPC ID is displayed in the Network Type section of that page.
VSwitch ID
Hover over the VPC ID on the Database Connection page to view the VSwitch ID.
RDS for MySQL high-availability edition instances may have multiple VSwitch IDs. Ensure that you enter all VSwitch IDs associated with the instance.
In the RDS console, select Database Connection from the navigation pane on the left. In the Network Type information area, hover over the VPC ID to view the associated VSwitch ID.
Security Group ID
You can select the Use Managed Security Group option. If you use a custom security group, it must be one you created. Do not use a security group created by another service. You can create a security group in the ECS console on the Security Group page. The security group must meet the following requirements:
Its region must match the Region selected above.
When creating the security group, select the VPC where the RDS instance is located from the Network dropdown list.
Both basic and enterprise security groups are supported.
The security group must have no inbound rules.
Correct configuration:On the security group details page, the Security Group ID starts with sg (some information is redacted). The Intra-group Communication Policy is set to Allow, and the Security Group Type is Basic. In the Access Rules section, the Inbound tab shows no rules (0 entries).
Incorrect configuration: The security group's inbound rules are configured with five allow rules (all with priority 1): All ICMP (IPv4) (port range -1/-1), custom TCP port RDP (3389), custom TCP port SSH (22), custom TCP port HTTPS (443), and custom TCP port HTTP (80), all with a source of 0.0.0.0/0. While this configuration allows inbound traffic from any IP address, it only opens specific ports.
After the connectivity test passes, click Confirm. The system will then automatically configure the RDS data source. During this time, the workspace is locked, and you cannot create other data sources simultaneously.
Creating a data source may take several minutes during peak hours.
Status
Description
Created
The data source was created successfully. Select the data source and proceed to thenext step.
Creation Failed
The data source creation failed. Verify your parameters, correct them if necessary, and then clickRetry. You can also click Delete to remove the failed data source.
Before you create a data source, you must activate the EventBridge service.
When you import a large table with over 1,000,000 rows, the import process might take longer than the log retention period of your database. This can cause duplicate data imports. Learn how to resolve this.
Self-hosted MySQL limitations: The database must be deployed on an Alibaba Cloud ECS instance in any region. Only MySQL versions 5.6, 5.7, and 8.0 are supported. MySQL Proxy is not supported.
Database and table limitations: A knowledge base can only be associated with a single table in a single database; multi-table joins are not supported. The associated table can contain a maximum of 10,000,000 rows, and each row must be smaller than 100 KB. Data exceeding this size limit will be truncated. If this row limit does not meet your business requirements, you can submit a ticket to request an adjustment.
For Network Type, select Public Network or Private Network.
Private network data sources are only supported for ECS instances in specific regions. For other regions, select a public network data source. Private network data sources provide better security and performance.
Public network
Private network
To ensure that the knowledge base can receive data, configure an EventBridge allowlist for your self-hosted MySQL database.
If the allowlist is not configured correctly, you will receive a Communications link failure error when you create a data source.
How to configure the EventBridge allowlist
Go to the ECS console. In the left-side navigation pane, choose Security Group. Find the security group associated with your self-hosted MySQL instance, and then click Manage Rules in the Actions column.
On the security group details page, click Add Rule. Add all of the following EventBridge public IP addresses to the security group and configure the rule to allow all traffic on all ports.
Do not use a security group that was created indirectly by a third-party product or service.
In your MySQL database, create an account that allows traffic from all sources (or use an existing account), and then run the following GRANT commands.
Replace user1 in the following commands with your actual database username.
Copy
-- Create a user. Replace user1 with your actual database username.CREATE USER 'user1'@'%' IDENTIFIED BY 'your_password_for_user1';-- Grant privileges. Replace user1 with your actual database username.GRANT ALL PRIVILEGES ON *.* TO 'user1'@'%' WITH GRANT OPTION;-- Flush privileges (this only needs to be done once).FLUSH PRIVILEGES;
Enable binary logging (binlog) and Global Transaction Identifiers (GTID) by modifying the MySQL configuration file. On Linux systems, this file is typically located at /etc/my.cnf or /etc/mysql/my.cnf.
Restart the MySQL server for the changes to take effect.
Fill in the data source configuration details:
Parameter
Description
Data source name
The data source name must be unique within a workspace. This name cannot be reused, even if the data source creation fails.
Database host
Enter the public endpoint of your self-hosted MySQL database.
Database Port
Enter the port of your self-hosted MySQL database.
Database Username
Enter the database username that you granted privileges to in the previous step.
Click Create Data Source to submit the creation task. The system automatically configures the self-hosted MySQL data source. During this process, the current workspace is locked, and you cannot create other data sources simultaneously.
When you submit the task for the first time, follow the on-screen instructions to authorize the EventBridge service-linked role. Only a primary account can perform this action. To use a RAM user, the primary account must first grant the necessary permissions to that user.
Creating a data source can take several minutes during peak hours. Please wait for the process to complete.
Status
Description
Created
The data source was created successfully. Select the data source and proceed to the next step.
Failed
The data source creation failed. Verify that all parameters are correct, make the necessary changes, and click Retry. You can also click Delete to remove the failed data source.
To ensure that the knowledge base can receive data, configure an EventBridge allowlist for your self-hosted MySQL database.
If the allowlist is not configured correctly, you will receive a Communications link failure error when you create a data source.
How to configure the EventBridge allowlist
In your MySQL database, create an account that allows traffic from all sources (or use an existing account), and then run the following GRANT commands.
Replace user1 in the following commands with your actual database username.
Copy
-- Create a user. Replace user1 with your actual database username.CREATE USER 'user1'@'%' IDENTIFIED BY 'your_password_for_user1';-- Grant privileges. Replace user1 with your actual database username.GRANT ALL PRIVILEGES ON *.* TO 'user1'@'%' WITH GRANT OPTION;-- Flush privileges (this only needs to be done once).FLUSH PRIVILEGES;
Enable binary logging (binlog) and Global Transaction Identifiers (GTID) by modifying the MySQL configuration file. On Linux systems, this file is typically located at /etc/my.cnf or /etc/mysql/my.cnf.
Restart the MySQL server for the changes to take effect.
Fill in the data source configuration details:
Parameter
Description
Data source name
The data source name must be unique within a workspace. This name cannot be reused, even if the data source creation fails.
Region
Select the region where the ECS instance for your self-hosted MySQL database is deployed. You can find this information on the ECS console.
Database Endpoint
Enter the Private Address of your self-hosted MySQL database. You can find this on the Instances page on the ECS console. To view this page, go to the ECS console and choose Instances from the left-side navigation pane. The Private Address is listed for each instance.
Database Port
Enter the port of your self-hosted MySQL database.
Database Username
Enter the database username that you granted privileges to in the previous step.
Connectivity test: Click Start Test to check the network connectivity between Model Studio and your data source.
When you submit the task for the first time, follow the on-screen instructions to authorize the EventBridge service-linked role. Only a primary account can perform this action. To use a RAM user, the primary account must first grant the necessary permissions to that user.
VPC ID
Enter the Instance ID (for example, vpc-xxxxxx) of the VPC where your self-hosted MySQL ECS instance is deployed. You can find this information on the ECS console.
In the left-side navigation pane, choose Instances & Images > Instances. Find the target instance in the list. The corresponding VPC ID and VSwitch ID are shown in the VPC column.
VSwitch ID
The VSwitch ID (for example, vsw-xxxxxx) is displayed below the instance's VPC ID.
Security Group ID
You can use a managed security group. If you use a custom security group, it must be created directly by you, not indirectly by a third-party product or service. You can create a security group on the Security Group page of the ECS console. The security group must meet the following requirements:
The region of the security group must match the Region selected above.
The security group must be in the same VPC as the ECS instance.
Both basic and enterprise security groups are supported.
The inbound rules must not have any access restrictions.
After the connectivity test passes, click Create Data Source to submit the creation task. The system automatically configures the MySQL data source. During this process, the current workspace is locked, and you cannot create other data sources simultaneously.
Creating a data source can take several minutes during peak hours. Please wait for the process to complete.
Status
Description
Created
The data source was created successfully. Select the data source and proceed to the next step.
Failed
The data source creation failed. Verify that all parameters are correct, make the necessary changes, and click Retry. You can also click Delete to remove the failed data source.
Your database must be deployed on an Alibaba Cloud ECS instance in any region.
Database and table limitations:
A knowledge base connects to only one table in a single database. Joins across multiple tables are not supported. The associated table can contain up to 10,000,000 rows, with each row smaller than 100 KB. Data exceeding this limit is truncated. If this row limit is insufficient for your business needs, you can submit a ticket to request an adjustment.
For the network type, select Private Network.
Only ECS instances in select regions are supported. A private network data source offers better security and performance.
Create a private network data source
Configure the data source:
Parameter
Description
Region
Select the region of the ECS instance hosting your self-hosted PostgreSQL database. You can find this information in the ECS console.
Database address
Enter the private IP address of your self-hosted PostgreSQL database. To find this, go to the ECS console, click Instances in the left-hand navigation pane, and view the private IP address for the target instance.
Database port
Enter the port of your self-hosted PostgreSQL database. The default is 5432.
Database username
Enter the database account that you authorized in the previous configuration steps.
Database password
Enter the database password.
Database name
Required. Specify the name of the database to connect to (dbName).
ecsId
The ID of the ECS instance that hosts your self-hosted PostgreSQL instance.
Connectivity test: Click Start Test to verify the connection between Alibaba Cloud Model Studio and your data source.
When you submit this task for the first time, follow the on-screen instructions to authorize the DTS service-linked role. A root account must perform this action. To use a RAM user, the root account must grant the necessary permissions to the RAM user.
Parameter
Description
VPC ID
Enter the ID (vpc-xxxxxx) of the VPC that contains the ECS instance for your self-hosted PostgreSQL database. You can also find this information in the ECS console.
VSwitch ID
The VSwitch ID (vsw-xxxxxx) is displayed below the instance's VPC ID.
Security group
You can use a managed security group. If you use a custom security group, ensure it was created manually and not automatically by another Alibaba Cloud service. You can create a security group on the Security Groups page of the ECS console. The security group must meet the following requirements:
- The security group must be in the same region that you selected above.
- The security group must be associated with the same VPC as the ECS instance.
- Both basic and enterprise security groups are supported.
- Ensure the security group's inbound rules allow access from Alibaba Cloud Model Studio to your database port.
After the connectivity test passes, click Confirm to submit the task. The system automatically configures the PostgreSQL data source. During this process, the workspace is locked, and you cannot create other data sources.
During peak hours, data source creation might take several minutes.
Status
Description
Creation Succeeded
The data source was created successfully. Select the data source and then select a data table.
Creation Failed
The data source creation failed. Verify your parameters, make the necessary corrections, and then click Re-create Data Source. You can also click Delete to remove the failed data source.
On the dataset list page, click the Details button for a dataset to view its details page. The details page contains the following tabs:
Overview: Shows basic information about the dataset, such as its name, description, type, creation time, and storage quota, and lists its auto-generated tools.
Files/Tables (platform-hosted type only): Manage the files or table data within the dataset.
Tools: View the details of the dataset's auto-generated tools, including parameter descriptions and online testing.
On the dataset details page, you can expand a tool, fill in the parameters, and click the Run button to test the tool's response online.
On the Scheduled Sync tab of a file dataset details page, click Create Sync Rule to open the rule creation page.
Select a Category for the data synchronization.
Select a Sync Source:
OSS
Lark
DingTalk
SharePoint
Yuque Sync
Model Studio uses a service-linked role (SLR) to automatically synchronize data from OSS by accessing your buckets.
OSS synchronization uses a service-linked role (SLR) to access user buckets, eliminating the need to configure an AccessKey. Before first use, you must initialize the service-linked role and complete the authorization as prompted.
The object path must include the bucket name, for example, my-bucket/docs/ or my-bucket/docs/foo.md.
The current account must have read permissions for the target bucket. To grant access to Model Studio, you must also add the bailian-datahub-access tag with the value read to the target bucket. For more information, see Manage bucket tags.
Fill in the following OSS object information:
Parameter
Required
Description
OSS region
Yes
Select the region where the OSS bucket is located. For a list of supported regions, see OSS Regions Overview.
OSS object path
Yes
Enter the path of the OSS object to synchronize. The path must include the bucket name. For example, my-bucket/docs/ synchronizes all files in the directory, while my-bucket/docs/foo.md synchronizes a single file.
Synchronization period
Yes
Select the frequency for automatic data synchronization, for example, every minute.
Connection test
Yes
Click Connection Test to verify that the configured OSS path is accessible. You can submit the rule only after the test passes.
Data tags
No
Configure tags for the synchronized data to help categorize it. Each tag can be up to 64 characters long and can contain Chinese characters, uppercase and lowercase letters, numbers, underscores (_), and hyphens (-). Press Enter after typing to add a tag.
Access Lark knowledge bases and documents through Lark application credentials to synchronize content to the Bailian platform. For instructions on creating a Lark custom app, see Lark custom app development process.
Before synchronizing Lark documents, you must create a custom app on the Lark Open Platform and obtain the App ID and App Secret.
You must enable read-only permissions for knowledge base, cloud document, and spreadsheet features, as well as the contact user ID read permission for the app.
You must fill in one of the following: Lark Knowledge Base ID, Lark Folder ID, or Lark Document ID.
Synchronization is supported for documents (doc), spreadsheets (xls), bitable, PPT, and other nodes in Lark knowledge bases. It is not supported for locally uploaded files.
1. Create a Lark application and obtain credentials
Log in to the Lark Open Platform and click Developer Console in the upper-right corner. In the console, click Create Custom App, fill in the App Name, App Description, and App Icon, and then click Create.
On the app management page, find the Bot feature and click Add.
In the left-side navigation pane, click Permission Management. On the tab that opens, click Bulk Import/Export Permissions. Copy the following JSON-formatted permission description code into the Import tab, click Next, Confirm New Permissions, and then click Request to Enable.
The App Secret of your Lark custom app. Obtain it from the Credentials and Basic Information page on the Lark Open Platform.
Lark Knowledge Base ID
One of three
You must fill in one of the following: Lark Knowledge Base ID, Lark Folder ID, or Lark Document ID. Obtain it from the Lark knowledge base URL.
Lark Folder ID
One of three
You must fill in one of the following: Lark Knowledge Base ID, Lark Folder ID, or Lark Document ID. Obtain it from the Lark folder URL.
Lark Document ID
One of three
You must fill in one of the following: Lark Knowledge Base ID, Lark Folder ID, or Lark Document ID. Obtain it from the Lark document URL.
Exclude Document IDs
No
A list of Lark document IDs that you do not want to synchronize.
Lark Document Domain
No
If your document domain is xxx.feishu.cn/wiki/..., enter xxx. This is used to populate the document source URL during upload.
Sync Period
Yes
Select the frequency for automatic data synchronization. Options: 1 minute, 1 hour (default), and 1 day.
Connection Test
Yes
Click Connection Test to verify that the Lark application credentials and knowledge base access are working properly. You can submit the rule only after the test passes.
Data Tags
No
Configure tags for the synchronized data for easier categorization. Each tag can be up to 64 characters and supports Chinese, English letters (upper and lower case), numbers, underscores (_), and hyphens (-). Press Enter to confirm after typing.
After filling in the form, click Connection Test to verify connectivity. Once the test passes, configure data tags.
You must set export permissions for Lark.
Lark does not support exporting MindNote documents.
To create a DingTalk document synchronization rule, obtain the necessary credentials by following these steps.
1. Create a DingTalk application
Log in to the DingTalk Open Platform. Select an organization for which you have developer permissions, or select an organization and then obtain developer permissions.
In the top menu bar, select App Development.
On the right side of the page, click Create App, fill in the application name and description, and then click Save. You are automatically taken to the application details page.
2. Add permissions to the DingTalk application
Before synchronizing data, on the application details page, navigate to Development Configuration > Permission Management, then search for and enable the following permissions:
Contact.User.Read
Wiki.Workspace.Read
Wiki.Node.Read
Document.Workbook.Read
Notable.Base.Read_All
qyapi_get_member
3. Publish the application
In the left-side navigation pane of the application details page, click Version Management & Release.
On the right side of the page, click Create New Version and enter a version number (for example, 1.0.0) and a version description.
Set the visibility range, for example, to All Employees.
Click Save, and then confirm the publication.
4. Obtain the application Client ID and Client Secret
In the left-side navigation pane, click Credentials and Basic Information.
In the left-side navigation pane, click Contacts > Member Management.
In the member list, find the Employee UserID column and copy the UserID of the target user.
You must have administrative permissions for the organization to view employee UserIDs.
6. Enable DingTalk MCP
Before creating a DingTalk synchronization rule, you must enable the following MCP services in the DingTalk MCP Marketplace:
DingTalk Docs MCP: Required to synchronize DingTalk documents.
DingTalk Sheets MCP: Required to synchronize DingTalk spreadsheets.
Steps to obtain an MCP Endpoint:
Go to the DingTalk MCP Marketplace, find DingTalk Docs and DingTalk Sheets, and click to open their details pages.
On the details page, click to get the MCP server configuration and copy the corresponding MCP Endpoint link.
Paste the copied links into the DingTalk Docs MCP Link and DingTalk Sheets MCP Link fields in the form.
7. Obtain the DingTalk Knowledge Base ID, Folder ID, or Document ID
You must fill in one of the following three IDs in the form to specify which content to synchronize: DingTalk Knowledge Base ID, DingTalk Folder ID, or DingTalk Document ID. You can obtain them directly from the URL:
DingTalk Knowledge Base ID: Go to the DingTalk knowledge base homepage, click the knowledge base you want to synchronize, and find the ID at the end of the URL in your browser's address bar.
DingTalk Folder ID: In the knowledge base, click the corresponding folder. The ID is at the end of the URL.
DingTalk Document ID: In the knowledge base, click the corresponding document. The ID is at the end of the URL.
These three IDs determine the synchronization scope. Providing the knowledge base ID synchronizes the entire knowledge base. Providing the folder ID synchronizes that folder and its sub-documents. Providing the document ID synchronizes only that single document.
After completing the preceding steps, fill in the DingTalk Document Information:
Parameter
Required
Description
DingTalk user ID
Yes
Obtain this from Contacts > Member Management in the DingTalk Admin Console.
DingTalk application ID
Yes
Obtain this from the app management page on the DingTalk Open Platform.
DingTalk application secret
Yes
Obtain this from the app management page on the DingTalk Open Platform.
DingTalk knowledge base ID
One of three
You must enter one of the following: DingTalk Knowledge Base ID, DingTalk Folder ID, or DingTalk Document ID.
DingTalk folder ID
One of three
You must enter one of the following: DingTalk Knowledge Base ID, DingTalk Folder ID, or DingTalk Document ID.
DingTalk document ID
One of three
You must enter one of the following: DingTalk Knowledge Base ID, DingTalk Folder ID, or DingTalk Document ID.
DingTalk Docs MCP link
Conditionally required
This value is required if you need to synchronize DingTalk documents.
DingTalk Sheets MCP link
Conditionally required
This value is required if you need to synchronize DingTalk spreadsheets.
Synchronization period
Yes
Select the frequency for automatic data synchronization.
After filling in the information, click Connection Test to verify connectivity. After the test passes, configure the data tags.
Synchronization is supported for DingTalk documents, spreadsheets, and AI sheets created in a DingTalk knowledge base. It is not supported for documents and spreadsheets uploaded from local files.
DingTalk API call consumption
Each synchronization consumes the API quota of the DingTalk Open Platform. We recommend that you assess your API quota in advance to ensure it is sufficient. Consumption occurs in two phases: pre-synchronization check and synchronization execution.Pre-synchronization check (checks connectivity, permissions, and resource existence when a task starts):
Account authentication: 1 call.
Batch document check: 1 call for every 30 documents (rounded up), plus 1 additional call.
AI sheet existence check: 1 call per AI sheet.
Knowledge base existence check: 1 call per knowledge base.
Synchronization execution (pulls content into Model Studio):
Account authentication: 1 call.
Knowledge base content retrieval: 1 call per knowledge base.
AI sheet content retrieval: (Number of sheets + Number of unidirectional/bidirectional linked fields) calls per AI sheet.
ExampleTo synchronize 1 knowledge base (containing 50 documents) and 2 AI sheets (each with 3 sheets and 2 linked fields), the total API calls are calculated as follows:
This is a typical estimate. The actual consumption may fluctuate slightly due to factors such as API retries and error rollbacks.
Access SharePoint documents and folders through Azure AD application registration credentials to synchronize content to the Bailian platform.
SharePoint synchronization is currently available only to whitelisted users. To request access, contact the Alibaba Cloud Bailian team.
Prerequisites: Register an Azure AD app and obtain credentials
Log in to the Azure portal, search for Microsoft Entra ID (formerly Azure Active Directory) in the top search bar, or click Manage Microsoft Entra ID on the home page.
Under Manage in the left navigation pane, click App registrations, then click New registration. Fill in the application name and select the supported account type to create the app. For detailed instructions, see Microsoft documentation: Register an application.
On the app Overview page, in the Essentials section, copy the Directory (tenant) ID. This is the Tenant ID in the form.
In the same Essentials section, copy the Application (client) ID. This is the Client ID in the form.
Under Manage in the left navigation pane, click Certificates & secrets, switch to the Client secrets tab, and click New client secret. Fill in the description and set the expiration. Copy the Value immediately after creation (it is only displayed once and cannot be viewed after leaving the page). This is the Application Secret in the form.
Under Manage in the left navigation pane, click API permissions, click Add a permission, select Microsoft Graph -> Application permissions, and add the following permissions:
Sites.Read.All: Read files in SharePoint sites.
Files.Read.All: Read file content.
After adding permissions, click the Grant admin consent for [tenant name] button at the top of the page to complete authorization. The permission status will change to "Granted for [tenant name]".
Obtain SharePoint document or folder share links
Open the document or folder you want to synchronize in SharePoint.
Click the Share button in the upper-right corner, configure the sharing permissions, and obtain the share link.
Copy the share link and paste it into the SharePoint document or folder share link list field in the form. Separate multiple links with line breaks.
Fill in the following SharePoint document information:
Parameter
Required
Description
Tenant ID
Yes
The Directory (tenant) ID of your Azure AD app. Obtain it from the Essentials section on the app registration Overview page in the Azure portal.
Client ID
Yes
The Application (client) ID of your Azure AD app. Obtain it from the Essentials section on the app registration Overview page in the Azure portal.
Application Secret
Yes
The client secret value of your Azure AD app. Create it on the Certificates & secrets page in the Azure portal, under the Client secrets tab. Note: The secret value is only displayed once at creation time and cannot be viewed after leaving the page. Save it promptly.
SharePoint document or folder share link list
Yes
Enter the share links of the SharePoint documents or folders you want to synchronize. Separate multiple links with line breaks. Obtain share links through the Share feature in SharePoint.
Cloud Type
No
Select the cloud environment of your SharePoint account. Options: Global Public Cloud (default) and China 21Vianet. If your SharePoint account is deployed on the China 21Vianet cloud, select the corresponding option.
Sync Period
Yes
Select the frequency for automatic data synchronization. Options: 1 minute, 1 hour (default), and 1 day.
Connection Test
Yes
Click Connection Test to verify that the SharePoint credentials and share links are accessible. You can submit the rule only after the test passes.
Data Tags
No
Configure tags for the synchronized data for easier categorization. Each tag can be up to 64 characters and supports Chinese, English letters (upper and lower case), numbers, underscores (_), and hyphens (-). Press Enter to confirm after typing.
After filling in the form, click Connection Test to verify connectivity. Once the test passes, configure data tags.
Access Yuque documents and knowledge bases through a Yuque Token to synchronize content to the Bailian platform.
Obtain a Yuque Token
Personal Token: Log in to the Yuque settings page, create a new token, and copy it.
Team Token: Navigate to Team Space -> Team Settings -> Developer -> Tokens, create a new token, and copy it.
A Yuque access token. Both personal tokens and team tokens are supported. See the instructions above for how to obtain a token.
Document Permission Level
No
The permission levels of Yuque documents to synchronize. Multiple values are supported. 0: Private, 1: Public, 2: Public within the organization. Example: to sync private and organization-public documents, enter 0,2. Default: 0,1,2 (this setting does not apply when the URL list specifies a specific document).
Sync Period
Yes
Select the frequency for automatic data synchronization. Options: 1 minute, 1 hour (default), and 1 day.
Connection Test
Yes
Click Connection Test to verify that the Yuque Token and URLs are accessible. You can submit the rule only after the test passes.
Data Tags
No
Configure tags for the synchronized data for easier categorization. Each tag can be up to 64 characters and supports Chinese, English letters (upper and lower case), numbers, underscores (_), and hyphens (-). Press Enter to confirm after typing.
After filling in the form, click Connection Test to verify connectivity. Once the test passes, configure data tags.
Configure the data tags, and then click Confirm to complete the creation.
After creation, the rule is displayed on the synchronization rule list page, where you can Enable or Disable it in the Actions column.
Edit: Click a dataset's card to open its details page. Click the Edit button in the upper-right corner to modify the dataset's name and description. You cannot change the dataset type or storage method after creation. For database datasets, the connection information (database address, port, username, and password) also cannot be changed after creation. If the database password is changed, delete the original dataset and create a new one.
Copy: On the dataset list page or its details page, click the Copy button to create a new dataset with the same configuration.
Delete: On the dataset list page, click the More icon (···) on the target dataset card and select Delete, or click the Delete button on the dataset details page.
Deletion requires confirmation. You cannot undo this action.
Once a knowledge base is created, you cannot change its associated dataset. The Data source field on the knowledge base edit page is read-only. To use a different dataset, you must re-create the knowledge base.
After you create a connector, add its tools to your agent. The agent can then automatically call these tools in conversations to query and reference external data.
On the agent configuration page, click Skills in the left pane and find the Data Connector section.
Click the + button in the Data Connector section. In the Select Data Connector dialog box:
Browse or search for the target connector. You can filter by connector type.
Click Add next to the target connector.
Once added, the connector's tools automatically appear in the configuration list. You can click the settings button next to a tool to adjust its parameters.
Publish the agent so it can automatically call these tools in conversations.
After you create a connector, you can add a data connector node to your workflow. This allows the workflow to call connector tools to query external data and pass the results to downstream nodes.
On the workflow canvas configuration page, expand the node library on the left. Under the tools category, find the data connector node and drag it onto the canvas.
In the Select data connector dialog box:
Browse or search for the target connector. You can filter by connector type, such as File, Table, MySQL, PostgreSQL, Yuque, or OSS.
Expand the connector, select the tool you want to use (such as searchFile or getFile), and then click OK.
Configure node input: In the Input section of the node configuration panel, configure the tool's input parameters. Map outputs from upstream nodes or built-in variables to the required parameters, such as fileId.
Connect nodes: Connect the data connector node to upstream and downstream nodes to ensure the correct data flow.
The node's output is a result object with two fields: content (Array<Object>, the returned content) and isError (Boolean, indicates whether an error occurred). Downstream nodes can reference this output.
Each data connector node in a workflow can use only one tool. If you need to use multiple tools from the same connector, add multiple data connector nodes.
What should I do if I receive a "permission for this module is missing" error when importing data?
The root account must grant the Administrator permission to the RAM user. For more information, see Page permissions.
Is it safe to upload confidential files through public network datasets when creating a knowledge base?
Datasets transmit data through public network links, but the entire transmission uses HTTPS/TLS encrypted channels. Data is in ciphertext during transmission and cannot be interpreted even if the link is intercepted. After data reaches the platform, it is written directly to Alibaba Cloud internal network secure storage, which cannot be accessed from the public network. The public network only serves as a transport medium—data is not persisted on the public network.After import, files are stored as independent copies (unlinked from original data) in the platform's secure storage. Imported files are accessible only to users in the current workspace. Alibaba Cloud Model Studio does not use the data for any commercial purposes or make it publicly available.If you still have concerns about public network transmission, you can choose the following options for enhanced security:
Direct file upload: Upload local files through the file dataset. Data does not pass through public network links and is written directly to Alibaba Cloud internal network secure storage.
Private network data source: For Alibaba Cloud RDS for MySQL or self-managed MySQL databases, you can select private network (VPC) connection. Data is transmitted through the internal network, offering better security and performance. See the Private network data source section above.
Model Studio Standard and Enterprise editions have identical data security mechanisms: both provide user-level isolation, workspace member-only access, and HTTPS/TLS encrypted transmission. The difference between the two editions is only in storage capacity and feature limits, not security.
What should I do if file parsing takes a long time or occasionally times out?
During peak traffic or high concurrency, file parsing may take longer due to resource queuing, and occasional parsing timeouts may occur. We recommend retrying during off-peak hours or waiting patiently for the task to complete.
How do I configure permissions to import files from OSS?
The first time you import files from OSS, you must authorize Alibaba Cloud Bailian to access your OSS resources. The authorization process differs for a root account and a RAM user.
Authorize a root account
Authorize a RAM user
On the Import data page, click Authorize Now.
In the dialog box that appears, click Confirm Authorization. The system automatically creates an OSS service-linked role to allow Alibaba Cloud Bailian to access your OSS resources.
This change usually takes effect within seconds but can be delayed during peak hours.
Add the tag bailian-datahub-access with the value read to the target OSS bucket.
This tag identifies the buckets that Alibaba Cloud Bailian can access. Alibaba Cloud Bailian cannot access buckets without this tag.
Go to the OSS console. In the left-side navigation pane, click Bucket list and find the target bucket.
Hover over the Tag icon next to the bucket name and click Modify (if no tags have been set) or Go to edit.
On the bucket tags page, click Create tag (if no tags have been set) or Settings.
Click Tag, add a tag with the key bailian-datahub-access and the value read, and then click Save.
Return to the Import Data page, reselect the target bucket, and try the import again.
Note: Alibaba Cloud Bailian does not support accessing files in the root directory of a bucket. You must select an existing subdirectory or create a new one for Alibaba Cloud Bailian to access.
On the Import data page, click Authorize Now.
In the dialog box that appears, click Confirm Authorization. If the UI displays an Authorization failed error with the message The current user does not have permission to create a service-linked role, you must first grant this permission to the RAM user.
Sign in to theRAM console as the root account. In the left-side navigation pane, choose Permissions > Policies, and then click Create policy.
Click the Script editor tab. Copy and paste the following policy into the editor, and then click OK.
Enter a policy name, such as CreateServiceLinkedRole, and click OK.
In the left-side navigation pane, choose Identities > Users. Find the target RAM user in the list and click Add permissions in the Actions column.
Select the custom policy you created, and then click OK. This grants the RAM user permission to create the service-linked role.
Authorize the RAM user to access OSS through Alibaba Cloud Bailian.
Return to the Import Data page and click Authorize Now.
In the dialog box that appears, click Confirm Authorization. The system automatically creates an OSS service-linked role, which is required.
This change usually takes effect within seconds but can be delayed during peak hours.
Add the tag bailian-datahub-access with the value read to the target OSS bucket.
This tag identifies the buckets that Alibaba Cloud Bailian can access. Alibaba Cloud Bailian cannot access buckets without this tag.
Go to the OSS console. In the left-side navigation pane, click Bucket list and find the target bucket.
Hover over the Tag icon next to the bucket name and click Modify (if no tags have been set) or Go to edit.
On the bucket tags page, click Create tag (if no tags have been set) or Settings.
Click Tag, add a tag with the key bailian-datahub-access and the value read, and then click Save.
Return to the Import Data page, reselect the target bucket, and try the import again.
Note: Alibaba Cloud Bailian does not support accessing files in the root directory of a bucket. You must select an existing subdirectory or create a new one for Alibaba Cloud Bailian to access.
What should I do if I get error "10041495" when importing files from OSS?
This error is caused by the following reasons. Troubleshoot them in order:
The root account has not activated the OSS service. The root account must go to the OSS console and activate OSS as prompted.
The target OSS bucket does not have the bailian-datahub-access tag (with the value read). Alibaba Cloud Bailian cannot access buckets without this tag. Go to the bucket tags page in the OSS console and add the tag to the target bucket.
After you complete the preceding operations, return to the Alibaba Cloud Bailian page and authorize again.
What do I do if knowledge base data stops being synchronized after I change the password of an RDS MySQL database?
When a dataset is created, it saves the database connection information, including the database password, which cannot be modified afterwards. After you change the database password in the RDS console, the password saved in the dataset becomes invalid. Data synchronization then stops due to an authentication failure, and the knowledge base data is no longer updated.To resolve this issue, delete the original dataset, create a new dataset with the new password, and import the data again. Because a knowledge base cannot change its associated dataset, you must also re-create the knowledge base and associate it with the new dataset.
Which regions are supported for RDS and ECS instances used as private network data sources?
China (Hangzhou)
China (Shanghai)
China (Shenzhen)
China (Heyuan)
China (Guangzhou)
China (Qingdao)
China (Beijing)
China (Zhangjiakou)
China (Hohhot)
China (Ulanqab)
China (Chengdu)
How do I grant a RAM user the permissions to create the EventBridge service-linked role?
As the root account, attach the following three system policies to the RAM user: AliyunBailianFullAccess, AliyunEventBridgeFullAccess, and AliyunRDSReadOnlyAccess. For detailed instructions, see Manage permissions for a RAM user.
Using the root account, grant the RAM user the permission to create service-linked roles.
Sign in to the RAM console as the root account. In the left-side navigation pane, choose Permissions > Policies, and then click Create policy.
In the Script Editor, enter the corresponding content from the following script into the Effect, Action, Resource, and Condition fields, and then click OK.
Enter the policy name CreateServiceLinkedRole and click OK.
In the left-side navigation pane, choose Identities > Users. Find the target RAM user in the list and click Add permissions in the Actions column.
From the Policies list, select the CreateServiceLinkedRole policy that you just created, and then click OK. This grants the RAM user permission to create service-linked roles.
After completing these steps, return to the Create Data Source page as the RAM user and create the EventBridge service-linked role again.
What should I do if I get a "Database configuration check failed. The selected table contains a large amount of data" error?
ApsaraDB RDS for MySQL
Self-managed MySQL
The image is for illustration only. Recommended values vary based on your table's data volume. If an item is not mentioned, no change is required.Perform these steps as your root account.
Configure the local log retention period
Go to the RDS console. In the left-side navigation pane, click Instances, and then click the ID of the relevant RDS instance. In the left-side navigation pane, click Backup and recovery. On the Backup strategy tab, find the Retention period setting.
Set the Retention period to the value recommended in the prompt.
Configure wait_timeout
Go to the RDS console. In the left-side navigation pane, click Instances, and then click the ID of the relevant RDS instance. In the left-side navigation pane, click Parameter settings. On the Editable parameters tab, find the wait_timeout parameter.
Set the parameter to the value recommended in the prompt.
The image is for illustration only. Recommended values vary based on your table's data volume. If an item is not mentioned, no change is required.
Set the local log retention period
Method 1 (temporary): Modify expire_logs_days (for MySQL 5.7 or earlier) or binlog_expire_logs_seconds (for MySQL 8.0 or later) by running the SET GLOBAL command. This change is lost after the next MySQL restart.
MySQL 5.7 and earlier
MySQL 8.0 and later
Run the statement:
Replace the value 15 with the recommended value from the prompt.
Copy
SET GLOBAL expire_logs_days = 15;
To verify the change, run the following statement:
Copy
SHOW VARIABLES LIKE 'expire_logs_days';
Run the statement:
Replace the value 1296000 with the recommended value from the prompt.
Copy
SET GLOBAL binlog_expire_logs_seconds = 1296000;
To verify the change, run the following statement:
Copy
SHOW VARIABLES LIKE 'binlog_expire_logs_seconds';
Method 2 (Permanent): Set expire_logs_days (for MySQL 5.7 and earlier versions) or binlog_expire_logs_seconds (for MySQL 8.0 and later versions) in the MySQL configuration file, but this method requires a restart of the MySQL service.
MySQL 5.7 and earlier
MySQL 8.0 and later
For example, on a Linux system, the MySQL configuration file is typically located at /etc/my.cnf or /etc/mysql/my.cnf. If the file already contains expire_logs_days, you can modify it directly. If it does not exist, add it manually.
Replace the value 15 with the recommended value from the prompt.
Copy
[mysqld]expire_logs_days = 15
Save the configuration file, and then restart the MySQL service.
To verify the change, run the following statement:
Copy
SHOW VARIABLES LIKE 'expire_logs_days';
For example, on a Linux system, the MySQL configuration file is typically located at /etc/my.cnf or /etc/mysql/my.cnf. If the file already contains binlog_expire_logs_seconds, you can modify it directly. If it does not exist, add it manually.
Replace the value 1296000 with the recommended value from the prompt.
Copy
[mysqld]binlog_expire_logs_seconds = 1296000
Save the configuration file, and then restart the MySQL service.
To verify the change, run the following statement:
Copy
SHOW VARIABLES LIKE 'binlog_expire_logs_seconds';
Set wait_timeout
Method 1 (temporary): Execute the SET GLOBAL command to modify the wait_timeout parameter (in seconds). This change will be reset after the next MySQL restart.
Run the statement:
Replace the value 1159200 with the recommended value from the prompt.
This statement affects all new connections. Existing connections are not affected.
Copy
SET GLOBAL wait_timeout = 1159200;
To verify the change, run the following statement:
Copy
SHOW VARIABLES LIKE 'wait_timeout';
Method 2 (Permanent): Set the wait_timeout parameter (in seconds) in the MySQL configuration file, but this method requires a restart of the MySQL service.
For example, on a Linux system, the MySQL configuration file is typically located at /etc/my.cnf or /etc/mysql/my.cnf. If the file already contains wait_timeout, you can modify it directly. If it does not exist, add it manually.
Replace the value 1159200 with the recommended wait_timeout value from the prompt.
Copy
[mysqld]wait_timeout = 1159200
Save the configuration file, and then restart the MySQL service.
To verify the change, run the following statement:
Copy
SHOW VARIABLES LIKE 'wait_timeout';
What should I do if I get a CHECK_BINLOG_FORMAT, CHECK_ENFORCE_GTID_MODE, or CHECK_GTID_CONSISTENCY error when creating a data source?
These errors indicate that your MySQL database configuration does not meet the prerequisites of the dataset. When you create a data source, the system automatically validates the following configuration items:
Error code
Meaning
Expected value
CHECK_BINLOG_FORMAT
The binlog format must be ROW
binlog_format=ROW
CHECK_ENFORCE_GTID_MODE
GTID mode must be enabled
gtid_mode=ON
CHECK_GTID_CONSISTENCY
GTID consistency enforcement must be enabled
enforce_gtid_consistency=ON
Solution:
Alibaba Cloud RDS for MySQL
Self-managed MySQL
Go to the RDS console, click Instance List in the left-side navigation pane, and then click the target RDS instance.
Click Parameter settings in the left-side navigation pane. On the Editable parameters tab, change the following parameters to the expected values:
Set binlog_format to ROW
Set gtid_mode to ON
Set enforce_gtid_consistency to ON
After you submit the parameter changes, restart the RDS instance as prompted for the changes to take effect.
Modifying gtid_mode and enforce_gtid_consistency requires an instance restart. Perform this operation during off-peak hours to avoid affecting online services.
Modify the MySQL configuration file (on Linux systems, typically located at /etc/my.cnf or /etc/mysql/my.cnf), and add or modify the following configuration items in the [mysqld] section: