---
title: "Data Import, Export, and the Knowledge Center"
category: "data-center"
canonical: "https://www.ai-go.app/en-US/docs/guide/data-import-export"
locale: "en-US"
last_updated: "2026-08-10"
source: "AI GO 開發者文件（https://www.ai-go.app）"
---

# Data Import, Export, and the Knowledge Center

Data has to get in and get out before a platform is useful. This chapter covers three things: bringing existing data in, taking data out, and turning enterprise documents into knowledge that AI and applications can search.

---

## 1. Intelligent data import

**Entry point**: Dashboard → Data Center → Data Import. Requires `system.data_import`.

Traditional import tools require you to reshape your source files into the target format first. AI GO inverts that — **you supply raw files and AI handles the mapping**.

### Supported sources

- Multiple CSV files
- Excel workbooks
- JSON files
- Direct database connections

**Multiple files can be uploaded at once**, and that matters: in practice a complete dataset is usually spread across several tables (a customer master here, contacts there, transactions elsewhere), and the import engine handles the merge relationships between them.

### The import flow

1. **Upload and parse** — the system parses structure and profiles each column (type inference, value distribution, null ratio)
2. **AI mapping** — AI analyzes semantic similarity between source columns and target columns and proposes mappings. Candidate targets include **both built-in ERP tables and your custom tables**
3. **Review** — you confirm or adjust the mapping. The review interface flags:
   - Whether every required column has a source (warns if not)
   - A suggested deduplication key, so re-importing doesn't create duplicate rows
   - Columns or tables that need to be created
4. **Execute** — writes run in the background in batches. Failed rows are isolated with detail, so one bad row does not fail the batch

### Where imports land

The engine can write to three kinds of target:

- **Existing ERP tables** (through the same guardrails as the API)
- **Existing custom tables**
- **Newly created custom tables**, when the source has no counterpart on the platform

In other words, import doesn't only populate data — it can **build out the data model along the way**.

---

## 2. Data export

**Entry point**: Dashboard → Data Center → My Exports.

Export ERP tables and custom tables to JSON or CSV. Exports run asynchronously — submit and leave the page; completion arrives through the notification center, and files download from My Exports.

Large exports run on a background work queue, so they neither hold your session nor slow anyone else's queries.

### Exporting from an application

A Custom App action can produce a CSV download directly:

```python
def execute(ctx):
    rows = ctx.db.query('sale_orders', filters=[...])
    ctx.csv.export(rows, columns=['name', 'amount_total', 'state'],
                   filename='orders.csv')
```

`ctx.response.file()` returns arbitrary file content the same way.

---

## 3. Notification center

Export completion, approval tasks, and system events land in the notification center. It is the platform's unified event outlet — rather than every feature emailing separately, events collect in one place.

---

## 4. The Knowledge Center

**Entry point**: Dashboard → Knowledge Center (a top-level item alongside the Data Center). Requires `files.access`.

The Knowledge Center stores enterprise documents with a familiar cloud-drive interface — folders, upload, rename, delete, batch operations.

What makes it different: **any file can be marked as knowledge**, which turns it into a retrievable source for AI and applications.

### Marking a file as knowledge

Right-click a file and choose "set as knowledge". The system indexes it into **your organization's dedicated vector store**. Once processing completes, the file shows a knowledge marker.

From that point:

- The AI assistant automatically retrieves from the document when answering
- Custom Apps can search it through the SDK

To remove it, right-click and choose "unset as knowledge". The file leaves the retrieval set but **remains in the Knowledge Center**.

### Supported formats

- **Supported**: `.pdf`, `.docx`, `.xlsx`, `.csv`, `.txt`, `.json`, `.md`, `.zip`, and similar document and code files
- **Not supported**: media and vector image files (`.mp4`, `.mp3`, `.wav`, `.svg`, etc.) are blocked
- **Folders** cannot be marked as a whole — enter the folder and set individual files

### File-level access policies

Every file has its own access policy, with four options:

| Policy | Who can see it |
|---|---|
| Inherit | Follows the containing folder's policy |
| Company-wide | All organization members |
| Restricted roles | Only members holding the specified roles |
| External-visible | Additionally retrievable by external applications |

**The policy governs both UI visibility and AI retrieval.** A file you lack access to behaves as if it does not exist in search results — no snippets, no filenames.

Set it by right-clicking a file or folder and opening access settings. Folder policies are inherited by files set to "inherit".

---

## 5. Searching knowledge from a Custom App

This is the Knowledge Center's most important capability for developers: **applications can search enterprise knowledge and generate their own responses**.

```python
def execute(ctx):
    hits = ctx.knowledge.search(ctx.params['question'], top_k=5,
                                score_threshold=0.5)

    if not hits['enabled']:
        return ctx.response.json({'answer': 'No enterprise knowledge configured'})

    # results are chunk-level, each with a relevance score and source filename
    context = "\n\n".join(
        f"[{r['filename']}] {r['content']}" for r in hits['results']
    )

    # Fetch the full document when snippets aren't enough
    # full = ctx.knowledge.get_content(hits['results'][0]['file_id'])

    ctx.response.json({'context': context})
```

Three design points:

1. **Retrieval only, no generation.** `ctx.knowledge.search` returns source passages and relevance scores and **calls no language model**. To produce an answer, call your own model from inside the action using a key stored in App Secrets, passing the results as context. **Generation cost and model choice stay entirely under your control.**
2. **Permissions apply automatically.** Results are filtered by caller identity: internal apps filter by the **triggering user's** roles; external apps can only reach "external-visible" files; scheduled calls with no user context are treated as a member with no roles.
3. **Only your organization's files.** Deleted files and files belonging to other organizations are excluded unconditionally.

Retrieval requires the `knowledge.read` scope, which is high-risk — granting it requires the owner to re-enter their password (Chapter 10).