Glossary

What is data federation?

Data federation is a way to query data that lives in several systems, such as databases, warehouses and files, as if it were one database, without copying it into a central store first. A federation engine sends each source the part of the query it can run, then combines the results.

How data federation works

A federation engine sits between the people asking questions and the systems that hold the data. It keeps a connector for each source and a catalog of which tables exist where. When a query arrives, it does three things:

  • It resolves each table name to a source: crm.customers to the CRM database, a file path to object storage.
  • It sends each source its share of the work. Filters and column lists go to the source when the source can apply them, so only the rows and columns the query needs come back. That is predicate pushdown.
  • It joins, aggregates and sorts what comes back, in its own memory, and returns one result.

The data stays where it is, and every query reads the current state of each source. A single statement that works this way is a federated query.

An example in DuckDB

DuckDB can act as a small federation engine: it attaches SQLite, PostgreSQL and MySQL databases, and reads Parquet, CSV and JSON files as tables. This builds a CRM database in SQLite with 1,000 customers and a Parquet export of 1 million orders, then joins the two where they sit.

DuckDB
-- Source 1: an application database, here a SQLite file
ATTACH 'crm.db' AS crm (TYPE sqlite);
CREATE TABLE crm.customers AS
SELECT range                AS id,
       'Customer ' || range AS name,
       CASE WHEN range % 10 = 0 THEN 'enterprise'
            WHEN range % 10 < 4 THEN 'mid-market'
            ELSE 'smb' END  AS segment
FROM range(1000);

-- Source 2: an export in Parquet
COPY (
  SELECT range                                         AS order_id,
         (range // 330) % 1000                         AS customer_id,
         ((range * 37) % 20000 / 100.0)::DECIMAL(10,2) AS amount,
         DATE '2026-01-01' + (range % 330)::INT        AS order_date
  FROM range(1_000_000)
) TO 'orders.parquet' (FORMAT parquet);

-- One query across both
SELECT c.segment, count(*) AS orders, sum(o.amount) AS revenue
FROM 'orders.parquet' o
JOIN crm.customers    c ON c.id = o.customer_id
WHERE o.order_date >= DATE '2026-11-01'
GROUP BY c.segment
ORDER BY revenue DESC;

On a laptop the query returns in about 10 ms: 47,268 orders and 4,722,995.34 in revenue for SMB, 23,634 and 2,365,096.37 for mid-market, 7,878 and 789,291.19 for enterprise. EXPLAIN shows each source doing its part. The date filter runs inside the Parquet scan, the SQLite scan reads only the id and segment columns, and DuckDB does the join. The query created no table and loaded nothing.

Data federation vs a data warehouse

Data federationData warehouse (copy first)
Where the data livesIn the source systemsCopied into one store
FreshnessCurrent as of the queryAs of the last load
Before the first queryA connection per sourceA pipeline per source
Load on the sourcesEvery query, minus what pushdown removesOne extract per load
Large scansAs fast as the slowest source and the network allowColumnar storage built for scans
HistoryOnly what the source keepsEvery load can be kept

Most teams use both. They query in place first, then copy the tables that are hot, slow or need history, with an ELT pipeline. Zero-ETL is a newer name for the query-in-place half.

Data federation vs data virtualization

The two terms overlap, and vendors often use them for the same thing. Where a line is drawn, federation is the mechanism: one query, many sources. Data virtualization is the layer built on that mechanism: named views that hide where the data lives, shared definitions, access rules and often a cache. A federation engine is useful on its own to an engineer writing SQL. A virtualization layer always has federation underneath.

Where it fits, and where it doesn't

Federation is a good fit for:

  • Questions that span systems, such as an application database joined with an event export or a warehouse table.
  • Exploration before a pipeline exists, including finding out whether a dataset is worth loading at all.
  • Operational questions that need the current state rather than last night's load.
  • Data you don't want to keep a second copy of, for cost or residency reasons. Query results still leave the source, so access rules matter either way.

It runs into limits when:

  • A source is slow or busy. The slowest source sets the pace, and an analytical scan on a production database competes with the application; see OLAP vs OLTP.
  • A filter can't be pushed down. The join across sources happens in the engine, so without a filter the whole remote table crosses the network.
  • You need history. A source table holds its current state, and yesterday's version exists only if someone copied it.
  • A source is down. A copy keeps answering; a federated query fails.
  • Sources disagree on details. Types, collations and NULL handling differ between systems, so a comparison can match in one and not in another.

Data federation tools

KindExamplesHow it federates
Distributed SQL enginesTrino, Presto, Starburst, DremioA cluster with a connector per source; every query goes through connectors
Warehouse featuresBigQuery federated queries, Amazon Athena Federated Query, Amazon Redshift federated queriesThe warehouse reaches out to a fixed set of external databases
Database extensionsPostgreSQL foreign data wrappers, SQL Server linked servers, Oracle database linksOne database exposes another's tables as its own
Embedded enginesDuckDB with its PostgreSQL, MySQL and SQLite extensionsA library attaches databases and reads files in the same process
Managed servicesMongoDB Atlas Data FederationA service queries clusters and object storage together
Virtualization platformsDenodo, TIBCO Data VirtualizationFederation plus a modelled layer of views, security and caching

In Thunderduck

Thunderduck is a federation engine built on DuckDB. Each connected source is a catalog: PostgreSQL, MySQL, SQL Server, Oracle, BigQuery, ClickHouse, MongoDB, Google Sheets, Iceberg, or files in S3, GCS, Azure and R2. One SQL statement can join across them, and each query runs in its own worker.

Filters that compare a column with constants are pushed into PostgreSQL, MySQL, SQL Server, Oracle and BigQuery, so those sources return only matching rows. Every query is priced from its plan before it runs, and a scan of a large external table with no selective filter is refused, so a federated query cannot quietly pull a whole production table.

When a copy is the better answer, CREATE TABLE ... AS SELECT moves a table into an Iceberg catalog, and a scheduled job or dbt pipeline keeps it current.

Docs: https://docs.thunderduck.ai/catalogs/

Related terms

Query the data where it lives.

Databases, warehouses and buckets in one SQL statement, from SQL clients, BI tools and AI agents.