Databricks Data Engineer Associate exam dumps

Databricks Data Engineer Associate practice question 320 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 320

Single answer

You are working on a Databricks Lakehouse project and need to add a comment to an existing Delta table to describe its purpose. Which of the following commands would correctly add a comment to the table?

  1. A

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

  2. B

    COMMENT ON TABLE 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 TABLE sales_data COMMENT 'This table contains monthly sales data.'

Show answer and explanation

Correct answer: A

Explanation

In Databricks, to add a comment to an existing table, the correct syntax is to use the ALTER TABLE command followed by SET COMMENT. The other options are either unsupported in Databricks or contain invalid syntax.

  • A. Correct.

    This is the correct syntax in Databricks to add a comment to an existing table using the ALTER TABLE command.

  • B. Incorrect.

    This syntax is incorrect because the COMMENT ON TABLE statement is not supported in Databricks.

  • C. Incorrect.

    This syntax is invalid as the ADD COMMENT clause is not a valid SQL construct in Databricks.

  • D. Incorrect.

    This syntax is incorrect because the UPDATE TABLE statement does not support adding 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