# Data source reference for Soda Core

Soda uses the official Python drivers for each supported data source. The configuration examples below include the default required fields, but you can extend them with any additional parameters supported by the underlying driver.

Each data source configuration must be written in a YAML file and passed as an argument using the CLI or Python API.

## General Guidelines

* Each configuration must include `type`, `name`, and a `connection` block.
* Use the exact structure required by the underlying Python driver.
* Test the connection before using the configuration in a contract.

```bash
soda data-source test -ds ds_config.yml
```

***

#### Connect to a data source already onboarded in Soda Cloud

If you have already [onboarded a data source](https://docs.soda.io/onboard-data-sources-and-datasets/onboard-datasets-on-soda-cloud) in **Soda Cloud**, make sure to use the **exact same data source name** in your Soda Core data source configuration. This ensures that datasets are correctly identified and mapped to the existing data source in Soda Cloud, whether you run verifications locally with Soda Core or remotely via a Soda Agent.

***

#### Onboard a data source programmatically

It is possible to onboard a data source to Soda Cloud (and to a Soda Agent) after onboarding it using Soda Core.

> To learn how, head to [onboard-datasets-on-soda-cloud](https://docs.soda.io/onboard-data-sources-and-datasets/onboard-datasets-on-soda-cloud "mention").

#### Using Environment Variables

You can reference environment variables in your data source configuration. This is useful for securely managing sensitive values (like credentials) or dynamically setting parameters based on your environment (e.g., dev, staging, prod).

**Example:**

<pre class="language-yaml" data-title="ds_config.yml"><code class="lang-yaml">type: postgres
name: postgres
connection:
  host: host_name
  port: 5432
  user: user_name
<strong>  password: ${env.SODA_DEMO_POSTGRES_PW}
</strong>  database: db_name
</code></pre>

Environment variables must be available in the runtime environment where Soda is executed (e.g., your terminal, CI/CD runner, or Docker container).

> For Soda to run quality scans on your data, you must configure it to connect to your data source.\
> To learn how to set up Soda from scratch and configure it to connect to your data sources, see Soda's [Quickstart](https://docs.soda.io/quickstart).

***

## Supported data sources

* [Athena](https://docs.soda.io/reference/data-source-reference-for-soda-core/amazon-athena)
* [BigQuery](https://docs.soda.io/reference/data-source-reference-for-soda-core/bigquery)
* [Databricks SQL](https://docs.soda.io/reference/data-source-reference-for-soda-core/databricks)
* [DuckDB](https://docs.soda.io/reference/data-source-reference-for-soda-core/duckdb) ([Pandas](https://docs.soda.io/reference/data-source-reference-for-soda-core/pandas), [Polars](https://docs.soda.io/reference/data-source-reference-for-soda-core/polars), etc.)
* [Fabric](https://docs.soda.io/reference/data-source-reference-for-soda-core/microsoft-fabric)
* [Oracle](https://docs.soda.io/soda-v4/reference/data-source-reference-for-soda-core/oracle)
* [PostgreSQL](https://docs.soda.io/reference/data-source-reference-for-soda-core/postgresql)
* [Redshift](https://docs.soda.io/reference/data-source-reference-for-soda-core/amazon-redshift)
* [Spark Dataframe](https://docs.soda.io/reference/data-source-reference-for-soda-core/spark-dataframe)
* [SQL Server](https://docs.soda.io/reference/data-source-reference-for-soda-core/sql-server)
* [Snowflake](https://docs.soda.io/reference/data-source-reference-for-soda-core/snowflake)
* [Synapse](https://docs.soda.io/reference/data-source-reference-for-soda-core/synapse)

<br>

***

{% if visitor.claims.plan ===  %}
{% hint style="success" %}
You are **logged in to Soda** and seeing the **Free license** documentation. Learn more about [documentation-access-and-licensing](https://docs.soda.io/reference/documentation-access-and-licensing "mention").
{% endhint %}
{% endif %}

{% if visitor.claims.plan ===  %}
{% hint style="success" %}
You are **logged in to Soda** and seeing the **Team license** documentation. Learn more about [documentation-access-and-licensing](https://docs.soda.io/reference/documentation-access-and-licensing "mention").
{% endhint %}
{% endif %}

{% if visitor.claims.plan ===  %}
{% hint style="success" %}
You are **logged in to Soda** and seeing the **Enterprise license** documentation. Learn more about [documentation-access-and-licensing](https://docs.soda.io/reference/documentation-access-and-licensing "mention").
{% endhint %}
{% endif %}

{% if !(visitor.claims.plan ===  %}
{% hint style="info" %}
You are **not logged in to Soda** and are viewing the default public documentation. Learn more about [documentation-access-and-licensing](https://docs.soda.io/reference/documentation-access-and-licensing "mention").
{% endhint %}
{% endif %}
