Databricks Data Engineer Associate exam dumps

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

Select 3

You are tasked with creating two tables in Databricks: one from a JDBC connection to a MySQL database and another from an external CSV file stored in an Azure Data Lake. Which of the following steps are required to accomplish this task?

  1. A

    Use the spark.read.format('jdbc') method to read data from the MySQL database and write it to a Delta table.

  2. B

    Use the spark.read.csv() method to read the CSV file and directly save it as a Delta table.

  3. C

    Specify the database connection properties such as URL, table name, user credentials, and driver while using the jdbc format.

  4. D

    Mount the Azure Data Lake storage to Databricks using a service principal or access key before accessing the CSV file.

  5. E

    Use the spark.sql() method to load data from the MySQL database into a Delta table.

Show answer and explanation

Correct answers: A, C, D

Explanation

To create a table from a JDBC connection, you need to use the spark.read.format('jdbc') method with the required connection properties. For external CSV files, the storage must first be accessible, which often involves mounting Azure Data Lake or providing credentials. Both data sources can then be written to Delta tables for further processing.

  • A. Correct.

    Correct. The spark.read.format('jdbc') method is required to read data from a JDBC source like MySQL, and the data can then be written to a Delta table.

  • B. Incorrect.

    Incorrect. While spark.read.csv() can read the external CSV file, you need to specify additional options and save the data as a Delta table explicitly. This option is incomplete.

  • C. Correct.

    Correct. The jdbc format requires specifying connection properties such as the database URL, table name, user credentials, and the appropriate driver.

  • D. Correct.

    Correct. To access an external CSV file in Azure Data Lake, you must first mount the storage to Databricks or provide appropriate access credentials.

  • E. Incorrect.

    Incorrect. The spark.sql() method is used to execute SQL queries, but it is not used to directly load data from databases like MySQL into Delta tables.

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