QuestionQ127

Importing Data

A data analyst must produce a sales report by joining a Unity Catalog-managed table with a table held in a MySQL database. The analyst wants the join to be efficient, run within Databricks, and be governed through Unity Catalog permissions and lineage.

Which approach should the data analyst use to satisfy these requirements?

  • A Use Lakehouse Federation to create a foreign catalog for the MySQL database, then write a SQL query joining the Delta table and the federated MySQL table directly in Databricks.
  • B Write a Python script to connect to both sources separately, download the data and join them in memory outside Databricks.
  • C Fully ingest the MySQL table into Databricks and store it as a new Delta table before joining.
  • D Register the MySQL table as a temporary view in Databricks using a standard Spark JDBC read, then join it with the Unity Catalog-managed table using Databricks SQL.
Explanation

Lakehouse Federation exposes MySQL data through a Unity Catalog foreign catalog, enabling Databricks to query foreign and local relations together. The foreign catalog is governed as a Unity Catalog securable, so access can be granted at catalog, schema, or table level, and the join remains in the Databricks-managed query path.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!