Databricks Data Engineer Associate exam dumps

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

Single answer

You are tasked with creating a managed table in Databricks to store customer sales data. The data is currently stored in a CSV file located in a mounted Azure Data Lake Storage. Which of the following commands will correctly create a managed table and load the data into it?

  1. A

    CREATE TABLE sales_data USING CSV OPTIONS (path '/mnt/sales_data.csv')

  2. B

    CREATE TABLE sales_data AS SELECT * FROM csv./mnt/sales_data.csv

  3. C

    CREATE OR REPLACE TABLE sales_data USING PARQUET OPTIONS (path '/mnt/sales_data.csv')

  4. D

    CREATE TABLE sales_data (id INT, amount DOUBLE) USING CSV OPTIONS (path '/mnt/sales_data.csv')

Show answer and explanation

Correct answer: B

Explanation

To create a managed table in Databricks, you need to use the CREATE TABLE AS SELECT (CTAS) syntax to copy data into Databricks' storage. Managed tables are fully controlled by Databricks, and the data is stored in the Databricks file system (DBFS). The second option is correct because it creates a managed table and loads the data into it from the specified CSV file.

  • A. Incorrect.

    This command specifies the USING CSV syntax and provides a path, but it does not load the data into a managed table. Instead, it points to an external table, which is not the requirement.

  • B. Correct.

    This command uses the CREATE TABLE AS SELECT syntax, which correctly creates a managed table by copying the data from the CSV file into Databricks' storage.

  • C. Incorrect.

    This command uses the CREATE OR REPLACE TABLE syntax, but it specifies the PARQUET format for a CSV file, which is incorrect. Additionally, it points to an external file rather than creating a managed table.

  • D. Incorrect.

    This command tries to define a schema for the table but still points to an external file and does not load the data into a managed 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