Databricks Data Engineer Associate exam dumps

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

Single answer

You are working with a Delta table named 'sales_data' in your Databricks environment. You want to add a comment to this table for documentation purposes, describing it as 'Contains sales transaction data for the last 5 years'. Which of the following commands will correctly add the comment to the table?

  1. A

    ALTER TABLE sales_data SET COMMENT 'Contains sales transaction data for the last 5 years';

  2. B

    COMMENT ON TABLE sales_data IS 'Contains sales transaction data for the last 5 years';

  3. C

    ALTER TABLE sales_data COMMENT 'Contains sales transaction data for the last 5 years';

  4. D

    ALTER TABLE sales_data ADD COMMENT 'Contains sales transaction data for the last 5 years';

Show answer and explanation

Correct answer: A

Explanation

In Databricks, to add a comment to a table, you use the 'ALTER TABLE ... SET COMMENT' command. The syntax is specific and must match the SQL language supported by Databricks. Other options are incorrect due to unsupported or invalid syntax in Databricks SQL.

  • A. Correct.

    This is the correct syntax for adding a comment to a table in Databricks using SQL.

  • B. Incorrect.

    This syntax is incorrect because 'COMMENT ON TABLE' is not supported in Databricks SQL.

  • C. Incorrect.

    This syntax is invalid as 'ALTER TABLE ... COMMENT' does not exist in Databricks SQL.

  • D. Incorrect.

    This syntax is invalid as 'ALTER TABLE ... ADD COMMENT' is not a supported command in Databricks SQL.

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