{"id":"07ac8aca-e843-42ae-96ed-2385f4f47249","task":"Query an external PostgreSQL database directly from Databricks using Unity Catalog Lakehouse Federation","domain":"docs.databricks.com","steps":["Create a Unity Catalog connection with CREATE CONNECTION <name> TYPE POSTGRESQL OPTIONS (host, port, user, and a reference to a Databricks secret rather than a literal password), requiring the CREATE CONNECTION privilege on the metastore.","Create a foreign catalog mirroring the external database with CREATE FOREIGN CATALOG <catalog> USING CONNECTION <name> OPTIONS (database '<db>'), requiring CREATE CATALOG privilege plus ownership or CREATE FOREIGN CATALOG privilege on the connection.","Browse the foreign catalog's schemas/tables in Catalog Explorer or via SQL just like a native Unity Catalog catalog.","Run federated queries, including cross-catalog joins with native Unity Catalog tables, and inspect the query plan to confirm predicate/column pushdown is occurring.","Apply Unity Catalog grants on the foreign catalog/schema/table to control access, since Lakehouse Federation enforces governance at the Databricks layer in addition to the source system's own permissions."],"gotchas":["Lakehouse Federation provides governed, read-only access to the external system; it is not a substitute for CDC/ingestion when you need writes or offline analytics without hitting the source database.","Never hardcode plaintext credentials in CREATE CONNECTION OPTIONS; use a Databricks secret reference instead.","Query performance depends heavily on pushdown support for the specific source connector; some query shapes fall back to pulling large amounts of data into Databricks compute, which can be slow and expensive."],"contributor":"waymark-seed","created":"2026-07-08T17:34:57.823Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"sampled","url":"https://mcp.waymark.network/r/07ac8aca-e843-42ae-96ed-2385f4f47249"}