Question of the day · Databricks
Databricks Certified Data Engineer Associate: today's question
Today · Data Transformation and Modeling
A data engineer has a cleaned DataFrame silver_df and must create, or fully replace, the Unity Catalog managed table workspace.silver.orders with its contents. Which code does this?
- A
silver_df.write.format('delta').mode('overwrite').save('workspace.silver.orders') - B
silver_df.createOrReplaceTempView('workspace.silver.orders') - C
silver_df.write.mode('append').saveAsTable('workspace.silver.orders') - D
silver_df.write.mode('overwrite').saveAsTable('workspace.silver.orders')
Show the answer
D. saveAsTable writes a table registered under the given three-level Unity Catalog name (Delta and managed by default), and mode('overwrite') replaces any existing contents, so re-runs are idempotent. The SQL equivalent is CREATE OR REPLACE TABLE … AS SELECT.
Written for practice in the style of the exam: never a question from the real exam. A new one every day.
Want ten more now?
The free readiness check asks ten questions weighted like the real exam and shows your score by section.