3.5 Lakehouse Federation: Connections, Foreign Catalogs, & Query Pushdown

Key Takeaways

  • A foreign catalog is created in two steps: CREATE CONNECTION stores the credentials and JDBC endpoint as a Unity Catalog securable, then CREATE FOREIGN CATALOG mirrors the external database into the three-level namespace.
  • Lakehouse Federation is read-only in Azure Databricks - foreign catalogs support SELECT with query pushdown but never INSERT, UPDATE, MERGE, or DELETE against the source.
  • Query federation supports Microsoft SQL Server, Azure Synapse, MySQL, PostgreSQL, Oracle, Teradata, Amazon Redshift, Google BigQuery, Snowflake, Salesforce Data 360, and other Databricks workspaces.
  • Catalog federation is the second Lakehouse Federation mode: it reads foreign catalogs such as Hive metastore, AWS Glue, or Snowflake directly from object storage on Databricks compute only, which is cheaper and faster than JDBC pushdown.
  • When a source supports both Lakehouse Federation and Lakeflow Connect, Databricks recommends Lakeflow Connect whenever throughput on large volumes or low latency matters; federation is for ad hoc reporting and proof-of-concept access.
Last updated: August 2026

3.5 Lakehouse Federation: Connections, Foreign Catalogs, & Query Pushdown

DP-750 Exam Focus: The blueprint bullet is "Implement a foreign catalog by configuring connections." Expect scenarios where an operational database must be queried from Azure Databricks without copying the data, and where the wrong answer is "ingest it nightly."


1. What Lakehouse Federation Is

Lakehouse Federation is the Azure Databricks query federation platform. It gives governed, read-only access to data that lives outside Unity Catalog by projecting the external system into the familiar catalog.schema.table namespace as a foreign catalog, with Unity Catalog access controls applied at the table level and automatic query pushdown to the remote engine.

Two things follow immediately, and both are examinable:

  1. The data never moves. There is no copy, no schedule, and no storage cost in your lakehouse.
  2. You cannot write. Foreign catalogs are read-only in Azure Databricks. INSERT, UPDATE, MERGE, and DELETE against a foreign table are not supported.

2. The Two-Step Implementation

Step 1: Create the Connection

A connection is itself a Unity Catalog securable object. It stores the endpoint and the credentials once, so individual users never handle the source password.

-- Azure SQL Database / SQL Server
CREATE CONNECTION sqlserver_orders_prod TYPE SQLSERVER
OPTIONS (
  host 'orders-prod.database.windows.net',
  port '1433',
  user secret('federation_scope', 'sqlserver_user'),
  password secret('federation_scope', 'sqlserver_password')
);

-- PostgreSQL
CREATE CONNECTION postgres_crm TYPE POSTGRESQL
OPTIONS (host 'crm.postgres.database.azure.com', port '5432',
         user secret('federation_scope', 'pg_user'),
         password secret('federation_scope', 'pg_password'));

Reading the credentials from a secret scope rather than inlining them is the pattern the exam expects - it keeps the plaintext out of the connection definition, notebooks, and audit output.

Step 2: Create the Foreign Catalog

CREATE FOREIGN CATALOG orders_federated
USING CONNECTION sqlserver_orders_prod
OPTIONS (database 'OrdersDB');

-- Now the external database is addressable in the three-level namespace
SELECT customer_id, order_total
FROM   orders_federated.dbo.orders
WHERE  order_date >= current_date() - INTERVAL 7 DAYS;

Step 3: Grant Access

Foreign catalogs use the same hierarchical privilege model as any other catalog (Section 4.1):

GRANT USE CATALOG ON CATALOG orders_federated TO analytics_readers;
GRANT USE SCHEMA  ON SCHEMA  orders_federated.dbo TO analytics_readers;
GRANT SELECT      ON TABLE   orders_federated.dbo.orders TO analytics_readers;

Privileges Required to Build It

ActionPrivilege needed
Create the connectionCREATE CONNECTION on the metastore
Create the foreign catalog from itUSE CONNECTION on the connection plus CREATE CATALOG on the metastore
Query a foreign tableUSE CATALOG + USE SCHEMA + SELECT, exactly as for a managed table

3. Supported Sources

Query federation (JDBC pushdown) currently supports:

  • Microsoft SQL Server and Azure Synapse (SQL Data Warehouse)
  • MySQL, PostgreSQL, Oracle, Teradata
  • Amazon Redshift, Google BigQuery, Snowflake
  • Salesforce Data 360
  • Other Databricks workspaces

Catalog federation - the second Lakehouse Federation mode - supports the legacy Databricks Hive metastore, external Hive metastores, Snowflake, Salesforce Data 360 file sharing, Palantir Foundry, and OneLake.


4. Query Federation Versus Catalog Federation

This distinction is the highest-value fact in the section.

Query federationCatalog federation
Query pathPushed down to the foreign database over JDBCReads the foreign table directly from object storage
Where it runsPartly on Azure Databricks, partly on the remote engineOn Azure Databricks compute only
Cost/performanceBounded by the source database's capacityMore cost-effective and performance-optimized
Write supportNone (read-only)None (read-only)
GovernanceUnity Catalog foreign catalog, table-level access controlUnity Catalog foreign catalog, table-level access control
Best forAd hoc reporting, BI, proof-of-concept access to operational databasesIncremental Unity Catalog migration, or a long-term hybrid where some data stays in an external catalog

Pushdown has a victim. Because query federation executes part of the plan on the source system, a poorly filtered federated query puts load on a live operational database. Always filter and project in the WHERE and SELECT clauses so the pushdown is selective, and never point a dashboard that refreshes every minute at a production OLTP system through federation.


5. Federation Versus Ingestion: the Decision Rule

RequirementCorrect approach
Ad hoc lookup against an operational database, no copy allowedLakehouse Federation foreign catalog
Explore a source before committing to a pipelineLakehouse Federation
Incrementally migrate off a Hive metastoreCatalog federation
High-volume, low-latency, incremental replication into the lakehouseLakeflow Connect (Section 7.6)
Historical retention, time travel, and Delta optimization over the source dataIngest it - federation gives you neither
Any write-back to the sourceNeither - use the Spark Data Source API with JDBC

Databricks states the rule directly: when a source supports both Lakehouse Federation and Lakeflow Connect, prefer Lakeflow Connect if performance on higher data volumes and lower latency are priorities.

When Federation Is Not Enough and JDBC Is

The Spark Data Source API remains the escape hatch. Use it when Lakehouse Federation does not support your source, when you need write access, or when you need explicit control over partitioned parallel reads. Databricks Runtime bundles connectors for PostgreSQL, SQL Server, MySQL, Snowflake, and Redshift, and a JDBC Unity Catalog connection lets you bring your own driver with centralized credential management.


6. Exam Traps

  • "Create a foreign catalog and then MERGE into it" is always wrong. Federation is read-only.
  • A connection is not a catalog. Creating the connection alone exposes nothing; the foreign catalog is the second, separate statement.
  • Federation does not give you time travel. VERSION AS OF works on Delta tables, not on a live SQL Server table surfaced through federation.
  • Dedicated access mode caveat: on dedicated access mode compute, reads and REFRESH FOREIGN TABLE on foreign Iceberg tables require ALL PRIVILEGES.
Loading diagram...
Query Federation Versus Catalog Federation Execution Paths
Test Your Knowledge

A finance team must join live order status from an Azure SQL Database against gold tables in Unity Catalog. Compliance forbids copying the order data into the lakehouse, and the join runs a few times per day for ad hoc analysis. What should the data engineer implement?

A
B
C
D
Test Your Knowledge

After building a foreign catalog over a PostgreSQL CRM database, an engineer attempts to run a MERGE statement to write corrected records back to the source. The statement fails. Why?

A
B
C
D
Test Your Knowledge

A team must incrementally migrate thousands of tables off an external Hive metastore to Unity Catalog while keeping them queryable throughout, and wants queries to run entirely on Databricks compute for cost reasons. Which Lakehouse Federation mode fits?

A
B
C
D