📊Federated Query
Also known as Query Federation, Data Federation, Cross-Database Query
One SQL query that reads from more than one system.
Think of it like
It is like one shopping list that a helper fills from three different shops. You get one bag back.
Example
Finance wants to join this morning's customer list with last year's orders. A federated query does it now, with no pipeline.
Why it matters
It answers a question that spans two systems today. You do not wait for a pipeline to copy the data.
Definition
Example code
sql
SELECT c.name, SUM(o.total) AS spent
FROM postgresql.public.customers AS c
JOIN hive.sales.orders AS o ON o.customer_id = c.id
GROUP BY c.name;Common mistake
Key takeaways
- 1Many sources. One query, several systems.
- 2No copy first. Data stays where it is.
- 3Good for one-offs. Slower than one store.