Skip to main content

Data Connectors

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.

Connector types

Connectors are divided into platform-managed and stream-processing types based on data storage and access patterns:
CategoryConnectorData storageUse case
Platform-managedFilePlatform storage or self-owned OSSUpload and manage unstructured documents (PDF, Word, Markdown, etc.)
Platform-managedSpreadsheetPlatform storage or self-owned OSSImport and query structured spreadsheet data (CSV, Excel, etc.)
Stream processingMySQLData stays in source database, real-time accessConnect to MySQL databases, execute SQL queries
Stream processingPostgreSQLData stays in source database, real-time accessConnect to PostgreSQL databases, execute SQL queries
Stream processingPolarDB-X 2.0Data stays in source database, real-time accessConnect to Alibaba Cloud PolarDB-X 2.0 distributed databases
Yuque and OSS are not standalone connector types. They serve as sync data 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):
ConnectorRequirements
File / SpreadsheetFiles to upload, or an existing OSS Bucket
MySQLMySQL database instance (Alibaba Cloud RDS or self-hosted), network accessible
PostgreSQLPostgreSQL instance with wal_level set to logical
PolarDB-X 2.0Alibaba 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.
  • File
  • Spreadsheet
  • MySQL
  • PostgreSQL
  • PolarDB-X 2.0
File connectors manage unstructured documents (PDF, Word, etc.).
  1. Select File as the connector type.
  2. Enter the Connector Name and Description. The description guides application accuracy — describe the data content and purpose.
  3. 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-access tag with value ReadAndWrite to the target Bucket).
Click Confirm to complete creation.

Import data

After creating a connector, import data into it.

File connector

  1. Click Details on the target connector in the data connector list to open the Files tab.
  2. Select an existing category from the left tree, or click + to create a new one.
  3. Click Import Data, select Local Upload to upload files, or select OSS to pull files from OSS.
  4. Select a parsing method (default or custom); the system handles parsing automatically.
  • JSON, CSV, and YAML formats are not directly supported. Convert to XLSX or XLS before importing.
  • Imported files are stored as independent copies, with no link to the original data.

Database connector

Database connectors (MySQL / PostgreSQL / PolarDB-X 2.0) keep data in the source database — no manual import needed. Once created, applications can query data in real time.

Sync rules

File-type connectors support sync rules for automatically syncing files from external sources. In the connector detail page's Files tab, click Sync Data Rules → Create Sync Rule.
  • OSS
  • Feishu
  • DingTalk
  • SharePoint
  • 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/ or my-bucket/docs/foo.md.
  • Target Bucket must have the bailian-datahub-access tag (value read).
ParameterRequiredDescription
OSS RegionYesRegion of the OSS Bucket
OSS object pathYesPath including Bucket name (e.g., my-bucket/docs/ for a directory, or my-bucket/docs/foo.md for a single file)
Sync periodYesAuto-sync frequency
Connection testYesVerify the OSS path is accessible
Data tagsNoClassification tags, max 32 chars each
After configuration, click Connection Test to verify connectivity. Once passed, configure data tags and click Confirm to create the rule. The rule appears in the sync rules list, where it can be enabled or disabled.

File connector tools

File connectors automatically generate the following tools, callable from Agent applications or workflows:
ToolDescription
searchFileSearch files by keyword, returns matching file list with download links
getFileRetrieve file by ID, returns a download link

Manage connectors

From the data connector list, you can perform the following operations on existing connectors:
OperationDescription
EditModify connector name and description only
DuplicateCopy connector configuration to create a new connector
DeleteDelete 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

  1. In the Agent editor, go to Skills → Data Connectors.
  2. Click + and select the desired data connector.
  3. Click Publish — the Agent can now invoke the connector's tools in conversations.

Use connectors in workflows

  1. In the workflow editor, add a Data Connector node.
  2. Select a connector and the tool to use (one tool per node).
  3. The tool outputs a result object containing content (Array) and isError (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.
With a connector configured, move on to Create a Knowledge Base to build a searchable index from the connector's data.