# Connect data sources

Connect databases or upload files, then select the data you want to analyze.

使用指南 · 模块: data · 使用者 · 部署形态：资料未说明 · 已确认产品版本：资料未说明 · 来源：现有文档

Connect a database or upload files, then select the tables to analyze. AskTable reads the data structure and queries relevant data when you ask a question.

## Before you start

| Item         | Requirement                                                                                      |
| ------------ | ------------------------------------------------------------------------------------------------ |
| Permissions  | Project owner or administrator; ordinary project members cannot modify data source configuration |
| Prerequisite | A read-only database account and network connectivity from the AskTable server                   |
| Entry point  | Main navigation on the left → “More” → “Data sources”                                            |

The page title is “Data sources”, with “Add data source” at the top right. Use the search box to filter the list by name.

## Steps

**Select a type**

The creation flow shows three steps at the top: “Select type”, “Configure connection”, and “Add tables”.

Type cards are grouped under “Files”, “Databases”, and “Big data”. Click a card to proceed directly to the next step.

**Configure a database connection**

Enter the data source name, host, port, username, password, and a database name:

- The data source name is optional; leaving it blank generates one automatically.
- The port is prefilled with the engine's common default and can be changed directly.
- The database field's label varies by engine: most use Database DB, Oracle uses Service Name, and Databend has an additional compute cluster field.
- Engines that support multiple databases, such as MySQL, accept several database names in the same field separated by English commas. Leave it blank to include all databases.

In cloud deployments, a note below the host field asks you to allowlist the AskTable server (47.100.25.242) in your database.

Click “Add now” at the bottom right. The system automatically tests the connection before proceeding. On failure, a connection-failed dialog displays the database's original error.

**Add tables**

The table selection page is titled “Select tables”, with “Tables” and “Views” tabs at the top. Search by table or view name; “Sort” and “Select all” are on the right.

Select the tables to synchronize and click “Confirm selection (N)”. The button is disabled if no tables are selected. Click “Skip” to choose later; you can select tables again from the data source detail page at any time.

A checkbox below enables Value Index synchronization to improve field-value retrieval accuracy. It is unchecked by default. The accompanying note explains that building the index takes time and recommends enabling it only for smaller datasets or demanding retrieval needs. You can also trigger it manually after creation. See [AI indexes](https://docs.asktable.com/en/data/ai-search).

**Upload files (Excel / CSV)**

Selecting “Excel / CSV” changes the second step to an upload page. Enter a data source name, then drag files into the dashed area or click to select them.

The dashed area supports both clicking and drag-and-drop. Supported formats are .xlsx, .xls, and .csv, and you can upload several files at once. Selected files appear below and can be removed individually.

Click “Add now” to finish and return directly to the data source list.

**Create a Workbook (the third option)**

Selecting “Workbook” opens a separate “New Workbook” page. Enter a data source name and choose one of three methods:

| Method                     | Description                                                                                |
| -------------------------- | ------------------------------------------------------------------------------------------ |
| “Excel import”             | Upload Excel or CSV and create an editable Workbook after parsing                          |
| “Sync from Feishu Bitable” | Connect a Feishu application and select tables to create a read-only synchronized Workbook |
| “Blank Workbook”           | Create an empty Workbook, then add worksheets and fields manually                          |

## Supported data source types

This list matches the type cards on the creation page. Versions shown on the cards appear in parentheses.

**Files**: Excel / CSV (.xlsx / .xls / .csv), Workbook (Beta)

**Databases**: MySQL (5.7 / 8.0), PostgreSQL (9/14/15/16), PolarDB (MySQL 5.7 / 8.0), PolarDB (PostgreSQL 14/15/16), OceanBase (4.2.2), Dameng (DM8), Xugu (V11 / V12), TiDB (8.1.0), Oracle (18c / 12c), SQL Server (2012 / 2016 Web), MogDB (5.0.0), GaussDB (primary/standby edition), TDSQL (MySQL), TDSQL (PostgreSQL), KingbaseES (V8), GBase 8c (V5), YashanDB (23.2)

**Big data**: StarRocks (3.x), ClickHouse (22.12), Doris (3.0.5), Hive (3.x), MaxCompute (2025), Google BigQuery, Hologres (r3.2.x), AnalyticDB (MySQL), AnalyticDB (PostgreSQL), Databend (1.2), SelectDB (4.0.4), Greenplum (6.x), GBase 8a (V9), GaussDB(DWS) (8.x)

Although “Workbook” is in the Files group, it opens a separate creation page instead of the generic form.

## Chinese domestic Xinchuang databases

Each Xinchuang database has native support rather than relying on a generic driver. Enter connection details as for other databases: name, host, port, username, password, and database name.

| Database     | Version on card         | Notes                                                                                                              |
| ------------ | ----------------------- | ------------------------------------------------------------------------------------------------------------------ |
| Dameng (DM8) | DM8                     | Enterprise edition required; without authorization, connection testing returns 403 with `ACCESSOR_ENTERPRISE_ONLY` |
| GaussDB      | Primary/standby edition | Centralized database, in the Databases group                                                                       |
| GaussDB(DWS) | 8.x                     | Data warehouse, in the Big data group                                                                              |
| KingbaseES   | V8                      | In the Databases group                                                                                             |
| GBase 8c     | V5                      | In the Databases group                                                                                             |
| GBase 8a     | V9                      | In the Big data group                                                                                              |
| Xugu         | V11 / V12               | In the Databases group                                                                                             |
| YashanDB     | 23.2                    | In the Databases group                                                                                             |
| TDSQL        | MySQL / PostgreSQL      | Two cards; select the edition you use                                                                              |
| MogDB        | 5.0.0                   | In the Databases group                                                                                             |
| OceanBase    | 4.2.2                   | In the Databases group                                                                                             |
| TiDB         | 8.1.0                   | In the Databases group                                                                                             |

Oracle is an exception: its database field is labeled Service Name and requires the service name rather than the database name.

## Key constraints

| Item                        | Value or default                                                                                      | Where to change it                                                                                   |
| --------------------------- | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| Files per upload            | At most 10; larger batches are rejected                                                               | Form validation; not configurable                                                                    |
| Excel file size             | 10 MB by default; larger files are rejected                                                           | Avatar menu → “Settings” → “File uploads” → Maximum Excel file size (MB)                             |
| CSV file size               | 20 MB by default; larger files are rejected                                                           | Avatar menu → “Settings” → “File uploads” → Maximum CSV file size (MB)                               |
| CSV columns                 | 50 by default; files exceeding this are rejected                                                      | Avatar menu → “Settings” → “File uploads” → Maximum CSV fields                                       |
| Excel sheets                | 20 by default                                                                                         | Avatar menu → “Settings” → “File uploads” → Maximum Excel sheets                                     |
| Fields per Excel sheet      | 200 by default                                                                                        | Avatar menu → “Settings” → “File uploads” → Maximum Excel fields                                     |
| Tables per data source      | 100 by default; exceeding the limit shows a warning and disables “Confirm selection”                  | Avatar menu → “Settings” → “Data sources” → Maximum tables per source (applies to cloud deployments) |
| Dameng (DM8)                | Enterprise edition required; unauthorized connection testing returns 403 / ACCESSOR\_ENTERPRISE\_ONLY | Contact an administrator to upgrade to Enterprise                                                    |
| Multiple database separator | English commas only; invalid formatting is rejected                                                   | Form validation; not configurable                                                                    |

These are default values and can be adjusted in the administration console, except form-validation limits.

## Troubleshooting

| Symptom                                                        | How to identify it                                                                                                 | What to do                                                                                                                                 |
| -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ |
| Connection test fails                                          | The failure dialog shows the database's original error                                                             | Check host, port, account, password, and database name individually; for cloud deployments, allowlist the server address shown in the form |
| Cannot connect Dameng                                          | Enterprise edition is required, or the API returns 403 / ACCESSOR\_ENTERPRISE\_ONLY                                | Upgrade to Enterprise and reconnect                                                                                                        |
| Form blocks submission                                         | Validation identifies an empty host, nonnumeric port, port above 65536, empty database name, or empty Service Name | Complete the indicated field                                                                                                               |
| Cannot add a file                                              | File size or column count exceeds a limit                                                                          | Reduce or split the file, then upload again                                                                                                |
| “Confirm selection” is disabled                                | No table is selected, or more than 100 tables are selected                                                         | Select fewer tables; if more are necessary, ask an administrator to raise the per-source table limit                                       |
| No tables on the selection page                                | Database/table list is empty                                                                                       | Confirm that the account can read the target database; for Oracle, enter the correct Service Name                                          |
| Cannot find a table                                            | No matching results                                                                                                | Switch between Tables and Views and clear the search                                                                                       |
| Connection succeeds but synchronization continues indefinitely | The top status indicator says synchronizing                                                                        | Wait for metadata parsing; if it stalls for a long time, click the status indicator for error details                                      |

## Next steps

- Connecting BigQuery: [Connect Google BigQuery](https://docs.asktable.com/en/data/bigquery)
- Help AI identify fields correctly: [Table and field descriptions](https://docs.asktable.com/en/data/semantics)
- Maintain connected data: [Manage data sources, files, and training sets](https://docs.asktable.com/en/data/manage)
- Start asking questions: [Conversations](https://docs.asktable.com/en/conversation)
