CertSafari
    Databricks Certified Data Engineer Professional - October 9 onwards· Lessons

    Domain 2 · Lesson 17/46

    Lakehouse Federation: Connections, Foreign Catalogs and UC Permissions

    Configure Lakehouse Federation with governance across supported source systems, applying UC permissions and connection-level credentials.

    15 min read
    2.4% of exam
    6 sources
    Published 3 Oct 2026
    Docs as of 30 Sep 2026

    What you will be able to do

    • Explain how a Unity Catalog connection and a foreign catalog combine to give governed, read-only access to an external system
    • Choose between query federation and catalog federation, and name the sources each supports
    • Create a connection whose credentials are stored as Databricks secrets, then create a foreign catalog from it
    • Grant, revoke and audit connection privileges (CREATE FOREIGN CATALOG, USE CONNECTION) and table-level privileges on foreign catalogs
    • Predict who can query a foreign catalog on dedicated, standard and serverless compute

    Key concept

    Connection (Unity Catalog securable) — A connection is a Unity Catalog object that holds the endpoint and the login credentials for an external database. Every foreign catalog built on it uses those credentials. Governing the connection therefore decides who can expose the external system in Databricks at all.

    1.Two securables: the connection and the foreign catalog

    Lakehouse Federation lets you query data that lives in another system without first copying it into Databricks. The docs describe it as the Databricks query federation platform, which gives governed, read-only access to external data through Unity Catalog foreign catalogs. Governance is the reason to use it instead of a quick JDBC read. Because the external data shows up as Unity Catalog objects, you get the same privilege model, lineage and search that you have for your own tables.

    To make an external dataset queryable you create two objects. Both are securables, so both can be owned and granted on. The connection stores the path to the external system and the credentials for it. The foreign catalog is a mirror of one database in that system. It appears in the three-level namespace next to your normal catalogs.

    This split puts credentials at the connection level. The secret is held in one place, the connection, and every foreign catalog that uses the connection reaches the external system with that identity. Users are never handed the database password. Instead you give them Unity Catalog privileges on the foreign catalog's tables. The foreign catalog is the securable that mirrors the external database so you can run read-only queries and control access with Unity Catalog.

    A connection is also a different kind of object from the other credential-like objects in Unity Catalog. Storage credentials cover cloud object storage, and service credentials cover non-storage cloud services. A connection covers neither. It is the object for external systems such as databases.

    Checkpoint 1 of 9· Check yourself

    Which Unity Catalog object holds the path and credentials used to reach an external database, so that foreign catalogs do not need to store them?

    Sources123

    2.Query federation vs catalog federation, and the supported sources

    Lakehouse Federation comes in two types, and the exam expects you to pick the right one for a scenario. Both are read-only, and both govern access through a foreign catalog with table-level controls. The difference is where the query runs.

    With query federation, Unity Catalog pushes the query down to the external database over JDBC. The work is split between Databricks and the remote system's compute. With catalog federation, Databricks connects to an external catalog service and reads the table files directly from object storage. The query runs only on Databricks compute, so the docs call catalog federation more cost-effective and performance-optimized than query federation. Because catalog federation reads storage directly, it needs two more objects: a storage credential and an external location for the table paths.

    The two Lakehouse Federation types compared
    AspectQuery federationCatalog federation
    Query pathPushed down to the foreign database using JDBC; runs in Databricks and on remote computeReads the foreign table directly in object storage; runs only on Databricks compute
    Typical useAd hoc reporting or proof-of-concept access to operational databases with minimal data movementIncremental migration to Unity Catalog, or a long-term hybrid model with an external catalog
    Extra setup beyond connection + foreign catalogNoneA storage credential and an external location for the table paths
    Supported sourcesMySQL, PostgreSQL, Teradata, Oracle, Amazon Redshift, Salesforce Data 360, Snowflake, Microsoft SQL Server, Azure Synapse (SQL Data Warehouse), Google BigQuery, DatabricksLegacy Databricks Hive metastore, External Hive metastore, AWS Glue metastore, Salesforce Data 360, Snowflake, Palantir Foundry
    Write supportNot supported (read-only)Not supported (read-only)

    Snowflake and Salesforce Data 360 appear in both lists, so the source system alone doesn't decide the type. Look at the pattern instead. Live JDBC pushdown means query federation. Reading the source's storage directly means catalog federation.

    Federation also has limits. If you need to write to the external system, or your source isn't on these lists, the docs point you to the Spark Data Source API. When a source supports both federation and Lakeflow Connect, and performance on high data volumes or low latency matters, Databricks recommends Lakeflow Connect ingestion. Keep query federation for ad hoc reporting or proof-of-concept work.

    Checkpoint 2 of 9· Put it in order

    Put the query federation setup steps in the order the documentation gives them.

    1. 1.Run queries, which are pushed down to the external database
    2. 2.Grant privileges to users on tables in the foreign catalog
    3. 3.Create a foreign catalog using the connection
    4. 4.Create a connection in Unity Catalog with your access credentials and JDBC URL

    Checkpoint 3 of 9· Exam question

    A workspace admin runs the following statement to register an external PostgreSQL system in Unity Catalog: ```sql CREATE CONNECTION pg_orders TYPE postgresql OPTIONS ( host 'orders-db.internal', port '5432', user secret ('ops_scope', 'pg_user'), password secret ('ops_scope', 'pg_password') ); ``` A data engineer, who is not a metastore admin, needs to build a foreign catalog on top of `pg_orders` so downstream teams can query the tables as if they were native. Which combination of privileges must the engineer hold for the `CREATE FOREIGN CATALOG` statement to succeed?

    Sources21

    3.Creating a connection with connection-level credentials

    Several prerequisites apply before you create a connection.

    - Workspace: it must be enabled for Unity Catalog. Workspaces created after November 8, 2023 are enabled automatically. - Cluster compute: Databricks Runtime 13.3 LTS or above, in Standard or Dedicated access mode. - SQL warehouses: pro or serverless, version 2023.40 or above. - Network: the compute must be able to reach the target database. - Privilege: you must be a metastore admin or hold CREATE CONNECTION on the metastore. In workspaces that were enabled for Unity Catalog automatically, workspace admins have CREATE CONNECTION by default.

    You can create a connection in Catalog Explorer, with the CREATE CONNECTION SQL command, or through the REST API or CLI. In SQL, CREATE CONNECTION accepts these TYPE values: DATABRICKS, HTTP, MYSQL, POSTGRESQL, REDSHIFT, SNOWFLAKE, SQLDW, SQLSERVER. SaaS ingestion types can only be created in the UI or through the APIs. The options you supply depend on the connection type. PostgreSQL needs a host, port, user and password. Databricks recommends storing the sensitive values as Databricks secrets, not as plaintext strings.

    A PostgreSQL connection whose user and password are read from a Databricks secret scope, not stored as plaintextsql
    CREATE CONNECTION <connection-name> TYPE postgresql
    OPTIONS (
      host '<hostname>',
      port '<port>',
      user secret ('<secret-scope>','<secret-key-user>'),
      password secret ('<secret-scope>','<secret-key-password>')
    )

    Some connection options control trust, not identity. On PostgreSQL the connection is always encrypted with SSL. If the server presents a certificate from a private certificate authority, you can pass its PEM-encoded certificate in userProvidedServerCertificate. This option is an alternative to trustServerCertificate, which skips verification, and it takes precedence when both are set.

    Network access is a separate matter. The docs describe outbound security in two layers. Unity Catalog connections govern credentials and connection configuration such as the URL, host, port and options. Network policies govern which endpoints traffic can reach. A connection does not restrict network access at all.

    Checkpoint 4 of 9· Check yourself

    A security team says: "Because federated access goes through a governed Unity Catalog connection, compute can only reach hosts that have a connection defined." What is wrong with this?

    Checkpoint 5 of 9· Exam question

    A metastore admin creates a connection to a Snowflake warehouse and wants three business analyst groups to be able to query different foreign catalogs built from that one connection, without any of the groups being able to see the underlying host, port, or credential values, and without any group being able to mint additional foreign catalogs beyond the ones the admin creates for them. Which grant strategy achieves this?

    Sources134

    4.Creating the foreign catalog

    If you create the connection in the Catalog Explorer UI, the wizard creates the foreign catalog in the same flow. It then asks which workspaces can access the catalog, who owns it, and which privilege presets to grant. All account users get BROWSE by default. Data Reader grants read privileges, and Data Editor grants read and modify privileges.

    In SQL, creating the foreign catalog is a separate step and needs two privileges:

    1. CREATE CATALOG on the metastore. 2. Either ownership of the connection or the CREATE FOREIGN CATALOG privilege on the connection.

    The statement names the connection with USING CONNECTION and names the external database in OPTIONS. MySQL is the exception: it uses a two-layer namespace, so you don't supply a database. The statement never includes credentials, because they come from the connection. Foreign catalog metadata is synced into Unity Catalog on each interaction with the catalog, so the mirror stays current without a scheduled refresh.

    Checkpoint 6 of 9· Fill the gap

    Which keyword completes this statement so that the foreign catalog takes its path and credentials from an existing securable?

    CREATE FOREIGN CATALOG [IF NOT EXISTS] <catalog-name> USING  ?  <connection-name>
    OPTIONS (database '<database-name>');

    Sources1

    5.Governing access: connection privileges and table-level grants

    Governance works at two levels. Connection-level privileges decide who can build on the connection or use it. Table-level privileges on the foreign catalog decide who can read the mirrored data.

    The connection has two privileges you can grant:

    - CREATE FOREIGN CATALOG lets a user create a foreign catalog that is a read-only mirror of a database in the connection's data source. - USE CONNECTION lets a user use the connection in Lakeflow pipelines to ingest data from the source into Databricks.

    USE CONNECTION behaves differently at the metastore level. Granted on the metastore, it only lets the user view the details of connections. To actually use a connection, the user still needs USE CONNECTION on that specific connection.

    Only a metastore admin or the connection owner can grant or revoke these privileges. Only the connection owner can drop the connection.

    Granting a user the right to build foreign catalogs on a connectionsql
    GRANT CREATE FOREIGN CATALOG ON CONNECTION <connection-name> TO <user-name>;

    You can inspect connections with SHOW CONNECTIONS [LIKE <pattern>]; and DESCRIBE CONNECTION <connection-name>;. Which connections you see depends on your privileges. Users with USE CONNECTION on the metastore see all of them. Everyone else sees only the connections they own or hold some privilege on. To revoke a privilege, run REVOKE <privilege> ON CONNECTION <connection-name> FROM <user-name>;. To remove a connection, run DROP CONNECTION [IF EXISTS] <connection-name>;.

    Checkpoint 7 of 9· Match them up

    Match each privilege to what it permits.

    Tap a term, then the definition that fits it.

    Once the foreign catalog exists, you treat it like any other catalog. You grant read-only access to foreign tables with standard Unity Catalog privileges, and Databricks tracks lineage for them the same way it does for standard tables. Queries must use Apache Spark data types.

    The access mode of the compute changes who can query. On standard access mode and serverless compute, the standard catalog privileges apply. On dedicated access mode compute, the user must own the underlying connection to query the foreign catalog. Holding CREATE FOREIGN CATALOG on the connection is not enough.

    Checkpoint 8 of 9· Check yourself

    An analyst has CREATE FOREIGN CATALOG on a connection and SELECT on the foreign catalog's tables, but does not own the connection. Their query fails on a dedicated access mode cluster. Which change lets them query?

    Checkpoint 9 of 9· Exam question

    A data engineering team is deciding between Lakehouse Federation's query federation model and its catalog federation model for a new integration with an external Hive Metastore that already stores large Parquet tables in cloud object storage. Which statements correctly describe how these two models differ? (choose 2)(Select 2)

    Sources56

    Exam traps

    Each one states something that sounds right. Open it to see what is actually true.

    1. 1.Granting USE CONNECTION on the metastore lets a user use every connection in it.Why is that wrong?

      At the metastore level, USE CONNECTION only allows viewing connection details. The user still needs USE CONNECTION on each individual connection to use it.

      Covered in Governing access: connection privileges and table-level grants

    2. 2.Anyone with CREATE FOREIGN CATALOG on a connection can query the resulting foreign catalog on any compute.Why is that wrong?

      On dedicated access mode compute, only the connection owner can query the foreign catalog. Standard catalog privileges are enough only on standard access mode and serverless compute.

      Covered in Governing access: connection privileges and table-level grants

    3. 3.Lakehouse Federation can write back to the external database through the foreign catalog.Why is that wrong?

      Both query federation and catalog federation are read-only. For write access, the docs point to the Spark Data Source API.

      Covered in Query federation vs catalog federation, and the supported sources

    4. 4.Defining a Unity Catalog connection also restricts which external hosts compute can reach.Why is that wrong?

      Connections govern credentials and configuration only. Network policies control allowed traffic.

      Covered in Creating a connection with connection-level credentials

    Sources

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “A foreign catalog, a securable object in Unity Catalog that mirrors a database in an external data system”
      ↩︎ Two securables: the connection and the foreign catalog
      “choose query federation for ad hoc reporting or proof-of-concept work on your ETL pipelines”
      ↩︎ Query federation vs catalog federation, and the supported sources
      “We recommend that you use Databricks secrets instead of plaintext strings for sensitive values like credentials.”
      ↩︎ Creating a connection with connection-level credentials
      “you must be a metastore admin or a user with the CREATE CONNECTION privilege on the Unity Catalog metastore”
      ↩︎ Creating a connection with connection-level credentials
      “Databricks compute must use Databricks Runtime 13.3 LTS or above and Standard or Dedicated access mode.”
      ↩︎ Creating a connection with connection-level credentials
      “Permissions required: CREATE CATALOG permission on the metastore and either ownership of the connection or the CREATE FOREIGN CATALOG privilege on the connection.”
      ↩︎ Creating the foreign catalog
      “Foreign catalog metadata is synced into Unity Catalog on each interaction with the catalog.”
      ↩︎ Creating the foreign catalog
      “Not required for MySQL, which uses a two-layer namespace.”
      ↩︎ Creating the foreign catalog
      “Access credentials for the foreign catalog come from the named connection, so you don't specify them here.”
      ↩︎ Prediction
    2. 2.
      “It provides governed, read-only access to external data through Unity Catalog foreign catalogs”
      ↩︎ Two securables: the connection and the foreign catalog
      “The query is only run on Databricks compute, meaning that catalog federation is more cost-effective and performance-optimized than query federation.”
      ↩︎ Query federation vs catalog federation, and the supported sources
      “Create a storage credential and an external location for the table paths.”
      ↩︎ Query federation vs catalog federation, and the supported sources
      “Use it when Lakehouse Federation doesn't support your source, when you need write access”
      ↩︎ Exam trap 3
      “Create a connection in Unity Catalog with your access credentials and JDBC URL. Create a foreign catalog using the connection.”
      ↩︎ Checkpoint
    3. 3.
      “Connections are not the same as storage credentials (for cloud object storage) or service credentials (for non-storage cloud services).”
      ↩︎ Two securables: the connection and the foreign catalog
      “The SQL CREATE CONNECTION statement supports the following TYPE values: DATABRICKS, HTTP, MYSQL, POSTGRESQL, REDSHIFT, SNOWFLAKE, SQLDW, SQLSERVER.”
      ↩︎ Creating a connection with connection-level credentials
      “Unity Catalog connections do not enforce network restrictions.”
      ↩︎ Exam trap 4
      “Unity Catalog connections do not enforce network restrictions.”
      ↩︎ Checkpoint
    4. 4.
      “This option is an alternative to trustServerCertificate and takes precedence over it.”
      ↩︎ Creating a connection with connection-level credentials
    5. 5.
      “USE CONNECTION grants the ability to use the connection in Lakeflow pipelines to ingest data from the data source into Databricks.”
      ↩︎ Governing access: connection privileges and table-level grants
      “Users with the USE CONNECTION privilege on the metastore see all connections.”
      ↩︎ Governing access: connection privileges and table-level grants
      “A connection is a securable object in Unity Catalog that specifies a path and credentials for accessing an external database system.”
      ↩︎ Key concept
      “However, if granted at the metastore level, it only allows viewing the details of connections in the metastore.”
      ↩︎ Exam trap 1
      “A connection is a securable object in Unity Catalog that specifies a path and credentials for accessing an external database system.”
      ↩︎ Checkpoint
      “However, if granted at the metastore level, it only allows viewing the details of connections in the metastore.”
      ↩︎ Checkpoint
    6. 6.
      “You grant read-only access to foreign tables using standard Unity Catalog privileges.”
      ↩︎ Governing access: connection privileges and table-level grants
      “On standard access mode and serverless compute, standard catalog privileges apply.”
      ↩︎ Governing access: connection privileges and table-level grants
      “The CREATE FOREIGN CATALOG privilege on the connection isn't sufficient.”
      ↩︎ Exam trap 2
      “On dedicated access mode compute, you must own the underlying connection to query data in the foreign catalog.”
      ↩︎ Checkpoint

    Spotted a mistake, or was something unclear? Tell us.