| icon | plug |
|---|---|
| description | Connect your databases, warehouses, lakes, and APIs to Spice.ai Cloud. |
Spice.ai supports federated SQL queries across a wide range of data sources. Data connectors let you query external data directly or replicate it into Spice for accelerated access.
For the full list of connectors and configuration options, see Data Connectors.
| Category | Connectors |
|---|---|
| Relational databases | PostgreSQL, MySQL, MSSQL, ClickHouse |
| Data warehouses | Snowflake, Databricks, Dremio |
| Data lakes & formats | S3, Delta Lake, ABFS |
| APIs & other | GraphQL, GitHub, SharePoint |
| Streaming | Debezium CDC |
| Embedded / local | DuckDB, SQLite |
Data source credentials should be stored as secrets in your app. In the Portal, go to your app → Secrets and create entries for connection strings, access keys, or tokens.
{% hint style="info" %} Secret values are write-only and cannot be retrieved after saving. {% endhint %}
Add a dataset entry to your app's spicepod.yaml referencing the connector and secrets:
datasets:
- from: postgres:my_schema.my_table
name: my_table
params:
pg_host: my-database.example.com
pg_port: "5432"
pg_db: my_database
pg_user: "${secrets:PG_USER}"
pg_pass: "${secrets:PG_PASS}"Commit and deploy your app to make the dataset available for querying.
For faster queries, enable data acceleration to cache datasets in a local engine:
datasets:
- from: postgres:my_schema.my_table
name: my_table
acceleration:
engine: arrow # or duckdb, sqlite, postgres
refresh_interval: 10mAvailable acceleration engines:
- Arrow — In-memory, fastest performance.
- DuckDB — Embedded analytical engine.
- SQLite — Lightweight, persistent.
- PostgreSQL — Full-featured relational engine.
Spice normalizes unquoted SQL identifiers to lowercase (PostgreSQL-style). If your source uses mixed-case table or column names, double-quote them:
SELECT "ColumnName" FROM "MySchema"."MyTable"When connecting to object stores (S3, ABFS):
- Folder paths require an explicit
file_format(e.g.,parquet,csv). - Single file paths auto-detect the format from the file extension.
Spice infers the schema at deployment time. If the source schema changes, refresh will fail. Redeploy the app to pick up the new schema.
- Confirm the data source is network-accessible from Spice.ai Cloud (firewalls, IP allowlists).
- Verify secrets are correct and referenced with
${secrets:SECRET_NAME}syntax. - Check connector-specific docs for required parameters.