Databricks Data Engineer Associate exam dumps

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

Single answer

You are a data engineer managing a Delta table named sales_data in your Databricks workspace. Your team has requested that you add a description to the table to indicate that it contains monthly sales records. Which SQL command should you use to add a comment to this table?

  1. A

    ALTER TABLE sales_data COMMENT 'Table containing monthly sales records'

  2. B

    COMMENT ON TABLE sales_data IS 'Table containing monthly sales records'

  3. C

    ALTER TABLE sales_data SET COMMENT 'Table containing monthly sales records'

  4. D

    SET COMMENT FOR sales_data AS 'Table containing monthly sales records'

Show answer and explanation

Correct answer: B

Explanation

In Databricks SQL, the proper way to add or update a comment for a table is by using the COMMENT ON TABLE <table_name> IS '<comment>' syntax. This command allows you to clearly specify the table and the associated comment. Other options listed either use invalid syntax or are not supported in Databricks.

  • A. Incorrect.

    This is not a valid SQL syntax for adding a comment to a table in Databricks.

  • B. Correct.

    This is the correct syntax in Databricks SQL to add or update a comment on a table.

  • C. Incorrect.

    This syntax is incorrect because 'SET COMMENT' is not valid SQL syntax in Databricks.

  • D. Incorrect.

    This syntax is invalid because Databricks does not use 'SET COMMENT FOR' to add a comment to a table.

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