# How Source Datastores Work

Source: https://userguide.qualytics.io/source-datastore/datastore/deep-dive/how-it-works/

A source datastore is the same kind of object on every connector: a boundary in your storage, read through a connection, organized in layers that Qualytics handles the same way. This page covers how a datastore maps to your storage, the layers behind it, the lifecycle it goes through from creation to repeated scans, the guided first runs a new datastore shows, and the Timeline that records every change to its settings.

## Storage Mapping

The exact slice of data a datastore represents depends on the connector:

- For **relational databases** (PostgreSQL, Snowflake, and other JDBC engines), a datastore points at one **schema** inside a specific database. If a database holds three schemas that you want to monitor, you create three datastores. The Add Datastore form asks for both the database and the schema name so Qualytics knows exactly where to look.
- For **cloud object storage** (Amazon S3, Azure Data Lake Storage, Google Cloud Storage), a datastore points at a **folder path** inside a bucket, so files under the same prefix are grouped together.

In every case the mental model is the same: the datastore is the boundary Qualytics reads from, and the tables or files inside that boundary are the containers you will work with once Sync completes.

| Connector family | A datastore covers | Its containers |
| --- | --- | --- |
| **JDBC** | One schema of a database (the form asks for both) | Tables and views |
| **DFS** | One folder path of a bucket or container | Files, grouped by name pattern |
| **Native** | One schema or database of the platform, or one Salesforce org | Tables, collections, or objects |

## Architecture

The Qualytics Datastore framework is organized in four layers:

| Layer | Description |
| --- | --- |
| **Data access** | Qualytics reads fields and records through the connector and writes operation results to a linked enrichment destination. |
| **Namespace** | How data is organized: tables in a schema for databases, or files in a folder for file storage. |
| **Schema** | Field definitions and types supplied by the database or discovered from supported file formats. |
| **Storage Engine** | The actual platform where data resides. See [Supported Connectors](https://userguide.qualytics.io/source-datastore/datastore/deep-dive/supported-connectors/). |

## How It All Connects

```mermaid
graph LR
    IO["<b>Data access</b><br/>Read fields and records<br/>Write results to a linked enrichment destination"]

    IO --> NS1["<b>Tables in a Schema</b>"]
    IO --> NS2["<b>Files in a Folder</b>"]

    NS1 --> SC1["<b>RDBMS DDL</b>"]
    NS2 --> SC2["<b>AVRO, Parquet, CSV, JSON</b>"]

    SC1 --> SE1["Oracle DB"]
    SC1 --> SE2["PostgreSQL"]
    SC1 --> SE3["MySQL"]
    SC1 --> SE4["Snowflake"]
    SC1 --> SE5["Redshift"]
    SC1 --> SE6["...and more"]

    SC2 --> SE7["Amazon S3"]
    SC2 --> SE8["Azure Storage"]
    SC2 --> SE9["GCS"]
```

The key insight is that **Qualytics treats all datastores uniformly at the data-access layer**. Whether you connect a PostgreSQL database or an S3 bucket, Qualytics reads and writes Fields and Records the same way, enabling consistent profiling, scanning, and anomaly detection across your entire data landscape.

## Datastore Lifecycle

Every datastore in Qualytics follows a structured lifecycle, from initial creation through ongoing data quality operations.

```mermaid
graph TD
    A["<b>Create</b><br/>Add datastore & test connection"] --> B["<b>Link Enrichment</b><br/>Choose the destination"]
    B --> C["<b>Sync</b><br/>Discover tables, files & fields"]
    C --> D["<b>Profile</b><br/>Analyze data & infer checks"]
    D --> E["<b>Scan</b><br/>Run checks & detect anomalies"]
    E -->|"Repeat"| C
```

| Stage | Description |
| --- | --- |
| **Create** | Add a new source datastore by selecting a connector, providing connection credentials, and testing the connection. |
| **Link Enrichment** | Optionally link an enrichment destination so scan results, source record examples, remediation snapshots, and exports are written to your own infrastructure. |
| **Sync** | Discover the schema (tables, files, views, and fields) from your source datastore. This is the first operation after creation. |
| **Profile** | Analyze field patterns across records, detect data types, compute statistics, and automatically infer quality checks. |
| **Scan** | Execute quality checks against the data, measure data quality metrics, and detect anomalies from failed checks. |

> **Tip**
>
> The **Sync → Profile → Scan** cycle is repeatable. As your data evolves, re-running these operations keeps your quality checks and anomaly detection up to date.

> **Info: Run Sync from your source datastore**
>
> Start with **Sync** to discover tables and files. You can then run **Profile** and **Scan** from the datastore or selected containers. See the [Sync Operation](https://userguide.qualytics.io/operations/sync/sync/) page for step-by-step instructions.

### Guided First Runs

A newly created datastore shows a **Get started in three steps** strip at the top of its overview page, with Sync, Profile, and Scan as connected step cards. Each step unlocks when the previous one completes, and its card reflects the operation's live status: waiting as **To do**, then **Queued**, **Running**, and finally **Completed**, or **Failed** with a **Retry** button. Users who can run operations launch each step directly from its card. Once all three operations have completed successfully at least once, the datastore is fully initialized and the strip no longer appears.

## Datastore Timeline

The **Overview** tab of a datastore has a **Timeline** section, the same chronological log containers have. It records one entry per save, naming what changed, who changed it, and when:

- The datastore's own settings, such as its name, description, and location.
- The connection it reads through.
- Its group, its teams, and its tags.
- Its quality score settings.
- The enrichment destination it is linked to, including the removal of a destination that was deleted, recorded by name at the time it was deleted.

Operation runs and the timestamps a Sync writes are not listed, so the Timeline stays a record of decisions rather than of activity. The datastore's first version appears as its creation. Short values are shown inline as `from <previous value> to <new value>`, and a long change collapses behind a **View changes** control. If the history cannot be loaded, the section reads **Unable to load history** with a **Retry** action.

Comments work as they do on a container: a comment box above the Timeline, a **Comment** control under each change, replies one level deep, and `@` mentions that send the person an in-app notification opening the page on that comment. Reading the Timeline needs at least the **Reporter** team permission on the datastore, and posting, replying, or deleting your own comment needs at least the **Viewer** team permission. See [Commenting on the Timeline](https://userguide.qualytics.io/container/deep-dive/container-attributes/#commenting-on-the-timeline).

---

## See Also

- **Connection**

  How a connection holds the credentials that one or more datastores share.

  [Connection](https://userguide.qualytics.io/source-datastore/datastore/deep-dive/connection/)
- **Multiple-Schema**

  Create one datastore per schema or folder from a single connection.

  [Multiple-Schema](https://userguide.qualytics.io/source-datastore/datastore/deep-dive/multiple-schema/)
- **Supported Connectors**

  Every connector by family, with its enrichment support and multi-schema fields.

  [Supported Connectors](https://userguide.qualytics.io/source-datastore/datastore/deep-dive/supported-connectors/)
- **JDBC Connectors**

  How Qualytics reads relational databases and warehouses through JDBC.

  [JDBC Connectors](https://userguide.qualytics.io/source-datastore/datastore/deep-dive/jdbc/)
- **DFS Connectors**

  How Qualytics reads files from cloud object storage and distributed file systems.

  [DFS Connectors](https://userguide.qualytics.io/source-datastore/datastore/deep-dive/dfs/)
- **Native Connectors**

  How Qualytics reads a platform's own storage or API without its query engine.

  [Native Connectors](https://userguide.qualytics.io/source-datastore/datastore/deep-dive/native/)
- **Supported File Formats**

  The file formats DFS datastores read, including compressed variants.

  [Supported File Formats](https://userguide.qualytics.io/source-datastore/datastore/deep-dive/supported-file-formats/)
- **Filename Globbing**

  How DFS datastores group files with similar names into one container.

  [Filename Globbing](https://userguide.qualytics.io/source-datastore/datastore/deep-dive/filename-globbing/)
- **HashiCorp Vault**

  Pull connection credentials from a secrets manager instead of typing them in.

  [HashiCorp Vault](https://userguide.qualytics.io/source-datastore/datastore/deep-dive/hashicorp-vault/)
- **Examples**

  Real scenarios, from onboarding a warehouse to protecting a busy database.

  [Examples](https://userguide.qualytics.io/source-datastore/datastore/deep-dive/examples/)
- **Best Practices**

  Recommendations for scoping datastores, sharing connections, and keeping access tight.

  [Best Practices](https://userguide.qualytics.io/source-datastore/datastore/deep-dive/best-practices/)
- **Permissions**

  The role and team permission each datastore action needs.

  [Permissions](https://userguide.qualytics.io/source-datastore/datastore/deep-dive/permissions/)

*Last updated: November 16, 2026.*
