CertLumen

Databricks Data Analyst Associate · Section 4 · 20% of the exam

Querying cross-system analytics by joining data from a Delta table and a federated data source.

One of the objectives of the Databricks Certified Data Analyst Associate exam, in the section “Executing queries using Databricks SQL and Databricks SQL Warehouses”. Here is what it covers, the points to remember and a question to try.

What it covers

Joins combine tables side by side and set operations stack them. This lesson covers every join type and the rows it returns, single and composite keys, the LEFT JOIN plus WHERE trap, the union family, and Lakehouse Federation: connections, foreign catalogs and joins between Delta tables and federated tables.

Points to remember

  • INNER is the default join; LEFT, RIGHT and FULL outer joins keep unmatched rows from the preserved side and fill the other side with NULLs.
  • LEFT SEMI returns left rows that have a match (left columns only, no duplicates); LEFT ANTI returns left rows without a match.
  • Duplicate keys multiply rows; CROSS JOIN returns m × n rows.
  • Composite keys need every column in the condition: ON a.k1 = b.k1 AND a.k2 = b.k2 or USING (k1, k2).
  • A WHERE filter on the right-hand table of a LEFT JOIN removes the unmatched rows; put that condition in ON.

Try a question

Customer account data lives in a PostgreSQL database that the application team will not allow to be copied. Order history is in a Delta table in Unity Catalog. An analyst needs to join the two in Databricks SQL. What must be set up first?

  1. AAn external table whose LOCATION points at the PostgreSQL database, created with CREATE TABLE ... LOCATION
  2. BA Unity Catalog connection and a foreign catalog, so the tables can be queried with three-level names
  3. CAn OpenSharing (formerly Delta Sharing) share that the PostgreSQL team publishes for Databricks
  4. DA streaming table that reads the PostgreSQL tables with STREAM read_files on a schedule
Show the answer

B. Lakehouse Federation reads external databases in place. A Unity Catalog connection stores the PostgreSQL host and credentials, and a foreign catalog mirrors one database. Its tables can then be queried, and joined with Delta tables, using catalog.schema.table names on a pro or serverless warehouse. Foreign tables are read-only and governed by Unity Catalog privileges.

Written for practice in the style of the exam: never a question from the real exam.

In the course

The lesson Joins, Set Operations and Federated Queries teaches this objective (about 45 minutes), and 12 practice questions test it. The course has lessons, exam-style questions, timed practice exams and an AI tutor for every objective, and a pass prediction that tells you when you're ready to book.

More in this section

← Previous objective · All 39 objectives · Next objective →