Databricks Data Engineer Associate exam dumps

Databricks Data Engineer Associate practice question 318 of 532

Databricks Certified Data Engineer Associate. Associate level, Databricks. Free question with the correct answer and a full explanation.

Databricks Data Engineer Associate Question 318

Single answer

You are working in Databricks and need to add a comment to an existing Delta table named 'sales_data' within the 'analytics' database to clarify its purpose for future users. Which of the following commands will achieve this?

  1. A

    ALTER TABLE analytics.sales_data SET COMMENT 'This table contains monthly sales data.'

  2. B

    COMMENT ON TABLE analytics.sales_data IS 'This table contains monthly sales data.'

  3. C

    ALTER TABLE sales_data ADD COMMENT 'This table contains monthly sales data.'

  4. D

    UPDATE COMMENT ON analytics.sales_data TO 'This table contains monthly sales data.'

Show answer and explanation

Correct answer: A

Explanation

In Databricks, adding or updating a table comment is done using the 'ALTER TABLE ... SET COMMENT' command. This allows users to provide additional metadata to clarify the table's purpose. Other options presented use incorrect or unsupported syntax in Databricks.

  • A. Correct.

    Correct. The 'ALTER TABLE ... SET COMMENT' command is the correct syntax to add or update a comment on a table in Databricks.

  • B. Incorrect.

    Incorrect. While this syntax resembles traditional SQL, it is not valid in Databricks for adding comments to tables.

  • C. Incorrect.

    Incorrect. The 'ADD COMMENT' syntax is not valid in Databricks; the correct syntax is 'SET COMMENT'.

  • D. Incorrect.

    Incorrect. 'UPDATE COMMENT' is not a valid command in Databricks for modifying table comments.

Timed practice exam

Take a Databricks Data Engineer Associate practice test under exam conditions

45 questions in 90 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam