> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ones1ght.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Data Sources

> Connect and configure the external data that AI Skills read for analysis.

## What is a data source?

A data source is a **connection and configuration** to external data that the AI Skills in the [Skill Store](/en/agent/skill-store) use for analysis.
OneS1ght does not copy your data — it stores only the **connection details plus settings (columns, types, filters, mapping)** and derives the data by applying those settings at query time.
The file connector keeps the original as the stored source, while the database and API connectors read live on every query.

<Info>
  This screen is available to **Manager and above** (owner, manager) only. Menu visibility `manage`.
</Info>

## Three connector families

Depending on the shape of the source, you connect a data source through one of three connector families.

<CardGroup cols={3}>
  <Card title="File" icon="file-lines" href="/en/agent/connectors/file">
    Upload CSV, JSON, or Excel files. The original is stored on registration.
  </Card>

  <Card title="Database" icon="database" href="/en/agent/connectors/database">
    Connect to PostgreSQL, MySQL, MS-SQL, Oracle, or MongoDB and read live at query time.
  </Card>

  <Card title="Service (API · OData)" icon="plug" href="/en/agent/connectors/api">
    Call an HTTP API or OData service live at query time.
  </Card>
</CardGroup>

<Note>
  External service integrations (SaaS, etc.) are marked "Coming soon" and will be added in a later iteration.
</Note>

## List screen

Use `+ Add data source` to open the wizard, and click a row to open its detail screen.
The list supports search, connector filter, sort (Newest, Oldest, Title ↑, Title ↓), and pagination (8 per page).

| Column    | Description                           |
| --------- | ------------------------------------- |
| Name      | Data source title                     |
| Connector | Connection family (File, DB, Service) |
| Cols      | Number of mapped columns              |
| Rows      | Number of rows                        |
| Filters   | Number of applied filters             |
| Created   | Registration time                     |
| Updated   | Last modified time                    |

## The shared 4-step wizard

Every connector follows a common 4-step flow. File and API connectors add extra steps up front depending on the format (see each connector page).

<Steps>
  <Step title="Select connector">
    Choose the connector that matches your source — File, Database, or Service.
  </Step>

  <Step title="Data view · filter">
    Preview the source (top 100 rows) and add filters so only matching rows are used.
  </Step>

  <Step title="Field mapping">
    For each column, set a **Meaning (required, standard field name)** and **Detail (optional)**. You can use `✨ AI auto-mapping`.
  </Step>

  <Step title="Register">
    Enter a name, review the settings, and register the data source.
  </Step>
</Steps>

### Filter operators

<CardGroup cols={2}>
  <Card title="equals (=) · not equal (≠)">Exact text/number match</Card>
  <Card title="contains">Substring match</Card>
  <Card title="greater than (>) · less than (<)">Numeric comparison</Card>
  <Card title="not empty">Rows where a value exists</Card>
</CardGroup>

Multiple conditions are combined with AND — only rows that satisfy all of them are used.

### Column types

Text · Number · True/False · Date · Object (JSON)

## Detail screen

The detail screen shows:

* **Settings**: connector, source, header row, filters, and row count. Files show `source stored`; DB and API show `live source`.
* **Columns · mapping table**: column name, type, meaning, detail.
* **AI Skill output**: the exact form passed to the AI Skill (LLM) — metadata (schema, meaning) plus data (up to 100 rows). Table view / JSON tabs.

## Credential security

<Warning>
  Credentials such as database passwords and API keys/headers are **encrypted with AES-256-GCM** and are **never returned to the client.**
  When you edit a data source, leaving a credential field blank keeps the existing value.
</Warning>

<Note>
  Editing a data source **never changes the original.** Only the settings (columns, types, filters, mapping) change.
</Note>
