Databricks Certified Data Engineer - Associate

Databricks Certified Data Engineer - Associate

Get started today

Ultimate access to all questions.


The data engineering team is working with a Delta table named products that includes product details, such as the net price. Which of the following code blocks correctly applies a 50% discount to all products priced above 1000 and updates the table with the new prices?





Explanation:

The correct answer uses the UPDATE statement to modify existing records in the products table where the price is strictly greater than 1000. The syntax for updating records in a Delta table is straightforward: UPDATE table_name SET column_name = expr WHERE condition. This approach directly applies the 50% discount to the qualifying products. For more details, refer to the Databricks documentation on Delta UPDATE.