Spice supports query federation, enabling you to join, combine, and query data using SQL from multiple sources, including databases (PostgreSQL, MySQL), data warehouses (Databricks, Snowflake, BigQuery), and data lakes (S3, MinIO).

For a full list of supported sources, see Data Connectors.
To start using federated queries in Spice, follow these steps:
Step 1. Install Spice by following the installation instructions.
Step 2. Clone the Spice Cookbook repository and navigate to the federation directory.
Step 3. Login to the demo Dremio.
Step 4. Create a new Spice app called demo.
Step 5. Add the spiceai/fed-demo Spicepod.
Note in the Spice runtime output several datasets are loaded.
Step 6. Start the Spice runtime.
Step 7. Show available tables and query them, regardless of source.
Show the available tables:
Execute the queries:
Step 8. Join tables across remote sources and locally accelerated source
Step 9. Join tables across locally accelerated sources and query
While the query in step 8 successfully returned results from federated remote data sources, the performance was suboptimal due to data transfer overhead.
To improve query performance, step 9 demonstrates the same query executed against locally materialized and accelerated datasets using Data Accelerators, resulting in significant performance gains.
:::warning[Limitations]
:::