Databricks Data Engineer Associate exam dumps

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

Select 3

You are tasked with creating a Delta table in Databricks using data from two different sources: a relational database accessible via JDBC and an external CSV file stored in a cloud storage bucket. Which of the following steps are correct to load the data and create the table?

  1. A

    Use the spark.read.format('jdbc') method to load data from the database, then write the data to a Delta table using write.format('delta').

  2. B

    Use CREATE TABLE ... USING CSV to directly create a table from the external CSV file location.

  3. C

    Use spark.read.format('csv') to load the CSV file, transform the data if needed, and then write it to a Delta table using write.format('delta').

  4. D

    Use the CREATE DELTA TABLE SQL syntax to directly load data from a JDBC source into a Delta table.

  5. E

    Configure the JDBC connection URL and credentials in a secret scope, then use spark.read.jdbc to load the data and write it to a Delta table.

Show answer and explanation

Correct answers: A, C, E

Explanation

To create a Delta table in Databricks from a JDBC source or an external CSV file, you should use the appropriate Spark DataFrame API methods (spark.read.format('jdbc') or spark.read.format('csv')) to load the data into a DataFrame. Once loaded, you can write the data to a Delta table using write.format('delta'). Additionally, securely configuring JDBC connection details in a secret scope is considered a best practice.

  • A. Correct.

    Correct: This is the correct way to load data from a JDBC source into a Delta table. The spark.read.format('jdbc') method allows you to read the data, and write.format('delta') ensures it is written to a Delta table.

  • B. Incorrect.

    Incorrect: While CREATE TABLE ... USING CSV can create a table from an external CSV, it does not automatically create a Delta table and would require additional steps to convert the data to Delta format.

  • C. Correct.

    Correct: Using spark.read.format('csv') is the proper way to load data from a CSV file programmatically. After transformations, writing it with write.format('delta') creates a Delta table.

  • D. Incorrect.

    Incorrect: There is no CREATE DELTA TABLE SQL syntax that directly loads data from a JDBC source. You need to use Spark DataFrame APIs for this.

  • E. Correct.

    Correct: Configuring the JDBC connection URL and credentials in a secret scope is a best practice for managing sensitive information securely. Using spark.read.jdbc to load the data is a valid approach, followed by writing it to a Delta 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