Ingest files, spreadsheets, databases, and external sources into Knowledge Studio.
Data connectors are the unified entry point for managing external data sources. By creating connectors, applications can securely access enterprise databases, document systems, and object storage, querying and referencing data in real time during conversations.
Connectors are divided into platform-managed and stream-processing types based on data storage and access patterns:
Go to Data Ingestion → Data Connectors in the console, click Create Connector, select a type, and configure as follows. The connector name must not exceed 20 characters, and the description must not exceed 200 characters.
Click Confirm to complete creation.
Platform-managed file capacity (200,000 files / 1 TB) is separate from the knowledge base document limit, which remains 100,000 documents per knowledge base.
After creating a connector, import data into it.
Available methods depend on the file type. Use the default settings if you are unsure.
Click Details for the target spreadsheet connector to open data management. Under Table Management on the left, select an existing table or click + to create one.
On the details page of a file or spreadsheet connector, select a category, click Import Data, choose OSS, then select a parsing method and confirm the import. Check these requirements first:
Database connectors (MySQL / PostgreSQL / PolarDB-X 2.0) keep data in the source database — no manual file upload is needed. Only connectors created by importing data sources from DMS support SQL queries in applications; custom data sources do not support direct SQL execution.
The following applies only to the legacy path that imports and synchronizes database tables into a knowledge base, not to direct SQL queries through DMS data sources:
File-type connectors support sync rules for automatically syncing new or updated files from external sources.
After configuration, click Connection Test to verify connectivity. Once passed, configure data tags and click Confirm to create the rule. You can enable, disable, or delete the rule in the list on the Scheduled Sync tab.
For OSS, Feishu, SharePoint, and Yuque sync, each data tag supports up to 64 characters: Chinese characters, uppercase and lowercase English letters, digits, underscores (
File connectors automatically generate the following tools, callable from Agent applications or workflows:
From the data connector list, you can perform the following operations on existing connectors:
Beyond the console, you can manage ingestion through the API — see API Reference — Data Import.
Connector types
Connectors are divided into platform-managed and stream-processing types based on data storage and access patterns:
| Category | Connector | Data storage | Use case |
|---|---|---|---|
| Platform-managed | File | Platform storage or self-owned OSS | Upload and manage unstructured documents (PDF, Word, Markdown, etc.) |
| Platform-managed | Spreadsheet | Platform storage or self-owned OSS | Import and query structured spreadsheet data (CSV, Excel, etc.) |
| Stream processing | MySQL | Data stays in source database, real-time access | Connect to MySQL databases, execute SQL queries |
| Stream processing | PostgreSQL | Data stays in source database, real-time access | Connect to PostgreSQL databases, execute SQL queries |
| Stream processing | PolarDB-X 2.0 | Data stays in source database, real-time access | Connect to Alibaba Cloud PolarDB-X 2.0 distributed databases |
OSS, Feishu, DingTalk, SharePoint, and Yuque are not standalone connector types. They serve as import and sync sources within file connectors — see Sync Rules.
Prerequisites
- Account permissions: Primary account or RAM user with data connector management permissions.
- Data source preparation (by connector type):
| Connector | Requirements |
|---|---|
| File / Spreadsheet | Files to upload, or an existing OSS Bucket |
| MySQL | MySQL database instance (Alibaba Cloud RDS or self-hosted), network accessible |
| PostgreSQL | PostgreSQL instance with wal_level set to logical |
| PolarDB-X 2.0 | Alibaba Cloud PolarDB-X 2.0 instance in a region supporting private network access |
Create a connector
Go to Data Ingestion → Data Connectors in the console, click Create Connector, select a type, and configure as follows. The connector name must not exceed 20 characters, and the description must not exceed 200 characters.
- File
- Spreadsheet
- MySQL
- PostgreSQL
- PolarDB-X 2.0
File connectors manage unstructured documents (PDF, Word, etc.).
- Select File as the connector type.
- Enter the Connector Name and Description. The description guides application accuracy — describe the data content and purpose.
- For Storage Location, choose Platform Storage (up to 200,000 files / 1 TB, free for a limited time) or Self-owned OSS (first-time use requires authorization; add the
bailian-connector-accesstag with valueReadAndWriteto the target Bucket).
Import data
After creating a connector, import data into it.
File connector
- Click Details on the target connector in the data connector list to open the File Management page.
- Select an existing category from the left tree, or click + to create a new one.
- Click Import Data, select Local Upload to upload files, or select OSS to pull files from OSS.
- Select a parsing method (default or custom); the system handles parsing automatically.
Choose a parsing method
Available methods depend on the file type. Use the default settings if you are unsure.
- Digital Parsing: Does not parse illustrations or charts in files.
- Intelligent Document Parsing: Extracts text from illustrations and generates summaries, which are chunked and vectorized with other text for retrieval.
- LLM Parsing: For recognizing and understanding illustrations and charts in documents.
- Qwen-VL Parsing: Supports images only. Select a Qwen-VL model and use a prompt to specify the content to recognize.
- Audio/Video Parsing: Recognizes human speech, not music or environmental sounds. For videos, it can also extract representative frames and text descriptions. Plot analysis is video-only and must be enabled manually to identify events, add timestamps, and generate descriptions.
- JSON, CSV, and YAML formats are not directly supported. Convert to XLSX or XLS before importing.
- Imported files are stored as independent copies. Deleting a source file does not delete its platform copy; manually remove it on the File Management page.
- Only files imported within the last 90 days can be viewed. Older files cannot be viewed, but are not automatically deleted.
Spreadsheet connector
Click Details for the target spreadsheet connector to open data management. Under Table Management on the left, select an existing table or click + to create one.
Import into a new table
- Enter a Table Name and choose how to define its structure:
- Upload Excel Directly: Detect the file header, create the table structure, and import the remaining content as data records.
- Custom Header: Enter the required Column Name and Type, plus an optional Description for each field. Use Add Field or Delete to adjust the fields. Describe field meanings in natural language.
- Upload an XLSX or XLS file with a header. The number of columns and column names must exactly match the target table, or the import fails.
- Click OK to start importing. The new table appears in the left-hand table tree when complete.
Import into an existing table
- Select the target table in the left-hand list and click Import Data.
- Select Upload and Overwrite or Incremental Upload. Use Download Template to obtain a header-only file, then fill in your data.
- Upload an XLSX or XLS file with a header. Its column count and names must match the current table, or the import fails.
OSS file import requirements
On the details page of a file or spreadsheet connector, select a category, click Import Data, choose OSS, then select a parsing method and confirm the import. Check these requirements first:
- On first use, authorize the OSS Service Linked Role (SLR) as prompted. For a RAM user, the primary account must first grant
ram:CreateServiceLinkedRolewith theram:ServiceNamecondition restricted todatahub.sfm.aliyuncs.com. Then return to the import page to authorize the role. - The current account needs read access to the target bucket, and the bucket must have the
bailian-datahub-accesstag with valueread. This is for import/sync reads, not thebailian-connector-access=ReadAndWritetag used for self-owned OSS storage. - Buckets using Archive, Cold Archive, or Deep Cold Archive storage classes are unsupported. Files in the bucket root are also unsupported; select a subdirectory.
- Private buckets and buckets with content encryption are supported; making them public is not required.
- If Referer-based hotlink protection is enabled, add
*.console.aliyun.comto the Referer allowlist. See OSS hotlink protection.
Database connector
Database connectors (MySQL / PostgreSQL / PolarDB-X 2.0) keep data in the source database — no manual file upload is needed. Only connectors created by importing data sources from DMS support SQL queries in applications; custom data sources do not support direct SQL execution.
Legacy database-to-knowledge-base sync limits
The following applies only to the legacy path that imports and synchronizes database tables into a knowledge base, not to direct SQL queries through DMS data sources:
- RDS MySQL: The platform and RDS instance must belong to the same Alibaba Cloud account. Activate EventBridge before creating a data source.
- Self-hosted MySQL: Must run on Alibaba Cloud ECS. Only MySQL 5.6 / 5.7 / 8.0 are supported; MySQL Proxy is unsupported. Activate EventBridge first.
- Self-hosted PostgreSQL: Must run on Alibaba Cloud ECS, use a private network, and be in a supported ECS region. Activate DTS and authorize its Service Linked Role before creating the data source. RAM users need the necessary permissions from the primary account first.
- Shared limits for these table sync paths: A knowledge base can link to only one table in one database; multi-table joins are unsupported. The table can contain up to 10,000,000 rows, with 100 KB per row. Content beyond the row-size limit is truncated.
binlog_format=ROW, gtid_mode=ON, and enforce_gtid_consistency=ON. Importing large tables with more than 1,000,000 rows can cause repeated imports if log retention is insufficient. Evaluate log retention and wait_timeout only when validation prompts recommend adjustments; otherwise, no change is needed. See official MySQL import troubleshooting.
Sync rules
File-type connectors support sync rules for automatically syncing new or updated files from external sources.
- Click Details on the target file connector in the data connector list.
- Switch to the Scheduled Sync tab and click Create Sync Rule.
- Select the Category in which to store synced files, then choose a sync source and configure it as follows.
- OSS
- Feishu
- DingTalk
- Yuque
Syncs OSS bucket data to the platform via Alibaba Cloud Service Linked Role (SLR).
- OSS sync uses SLR to access your Bucket — no AccessKey needed. First-time use requires authorization.
- Object paths must include the Bucket name, e.g.,
my-bucket/docs/ormy-bucket/docs/foo.md. - The current account needs read access to the target Bucket, which must have the
bailian-datahub-accesstag (valueread).
| Parameter | Required | Description |
|---|---|---|
| OSS Region | Yes | Region of the OSS Bucket |
| OSS object path | Yes | Path including Bucket name (e.g., my-bucket/docs/ for a directory, or my-bucket/docs/foo.md for a single file) |
| Sync period | Yes | One minute / One hour (default) / One day |
| Connection test | Yes | Verify the OSS path is accessible |
| Data tags | No | Classification tags, max 64 characters each |
_), and hyphens (-). Press Enter to add a tag.
Sync interval and file retention
- Sync interval: Choose one minute, one hour (default), or one day. This controls how often source changes are checked, not when files finish parsing and become searchable. Parsing and vectorization after syncing, including the first sync, may take several hours during peak traffic.
- Existing copies: Disabling or deleting a rule does not delete synced files. Deleting a source file does not automatically delete its platform copy either. Manually delete unwanted copies on the File Management page.
- Viewing window: Only files imported within the last 90 days can be viewed. Files outside this window cannot be viewed, but are not deleted.
File connector tools
File connectors automatically generate the following tools, callable from Agent applications or workflows:
| Tool | Description |
|---|---|
searchFile | Search files by keyword, returns matching file list with download links |
getFile | Retrieve file by ID, returns a download link |
Manage connectors
From the data connector list, you can perform the following operations on existing connectors:
| Operation | Description |
|---|---|
| Edit | Modify connector name and description only; database address, port, username, and password cannot be changed |
| Duplicate | Copy connector configuration to create a new connector |
| Delete | Delete the connector — irreversible |
Once a connector is bound to a knowledge base as a data source, the binding cannot be changed. To switch data sources, create a new knowledge base.
Use connectors in Agents
- In the Agent editor, go to Skills → Data Connectors.
- Click + and select the desired data connector.
- Click Publish — the Agent can now invoke the connector's tools in conversations.
Use connectors in workflows
- In the workflow editor, add a Data Connector node.
- Select a connector and the tool to use (one tool per node).
- The tool outputs a
resultobject containingcontent(Array) andisError(Boolean) fields.
Data Import API
Beyond the console, you can manage ingestion through the API — see API Reference — Data Import.
Data Import endpoints (
/api/v1/connector/dash/) share the same workspace URL and authentication as all other endpoints — see API Overview.