CertLumen

Databricks Data Engineer Associate · Section 3 · 22% of the exam

Understand the difference between, and how to build, Gold layer objects such as materialized views, views, streaming tables, and tables for BI and analytics teams in Unity Catalog.

One of the objectives of the Databricks Certified Data Engineer Associate exam, in the section “Data Transformation and Modeling”. Here is what it covers, the points to remember and a question to try.

What it covers

Spark SQL for data engineers: schemas and the three-level namespace, CTAS and INSERT INTO/OVERWRITE, views vs temp views vs global temp views, CTEs, CASE, window functions, higher-order array functions, and mixing Python with SQL safely.

Points to remember

  • SCHEMA and DATABASE are synonyms; use three-level names catalog.schema.table in Unity Catalog.
  • CTAS infers the schema from the query; CREATE OR REPLACE TABLE replaces data and may change the schema while keeping history.
  • INSERT INTO appends; INSERT OVERWRITE replaces all rows but requires a matching schema; REPLACE WHERE replaces matching rows only.
  • View = stored query in UC; temp view = current session; global temp view = global_temp on one classic cluster, not supported on serverless.
  • A CTE exists for one statement only; CASE without ELSE yields NULL.

Try a question

A standalone streaming table was created with CREATE OR REFRESH STREAMING TABLE workspace.silver.customers AS SELECT … FROM STREAM read_files(...). The engineer edits the query to add upper(country) AS country and runs the statement again. What happens to rows already in the table?

  1. AAll existing rows are automatically recomputed with the new logic during the next refresh.
  2. BThe statement fails, because a streaming table's query cannot be changed after creation.
  3. CExisting rows are deleted, and only files arriving after the change are processed.
  4. DExisting rows keep the old values; only rows processed from now on get the new logic.
Show the answer

D. A streaming table processes each input row once. Changing its definition affects only data processed after the change; existing rows are not recalculated. To apply new logic to history, run REFRESH STREAMING TABLE … FULL, which truncates and reprocesses everything still available in the source.

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

In the course

3 lessons teach this objective: Spark SQL Essentials, Gold Layer Objects, Lakeflow Spark Declarative Pipelines (about 135 minutes), and 25 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 29 objectives · Next objective →