Databricks Data Engineer Associate exam dumps

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

Single answer

You are working in a Databricks workspace with a catalog named 'main', a schema named 'sales', and a table named 'transactions'. How would you query the table using SQL in a Databricks notebook?

  1. A

    SELECT * FROM transactions;

  2. B

    SELECT * FROM sales.transactions;

  3. C

    SELECT * FROM main.sales.transactions;

  4. D

    SELECT * FROM main.transactions;

Show answer and explanation

Correct answer: C

Explanation

In Databricks, a three-layer namespace consists of catalog, schema, and table. To query a table, you must use the fully qualified name, which includes all three components. In this scenario, the correct query is 'SELECT * FROM main.sales.transactions;' because it specifies the catalog ('main'), schema ('sales'), and table ('transactions').

  • A. Incorrect.

    This query is incorrect because it does not specify the schema or catalog. In a three-layer namespace, you must include the catalog and schema before the table name.

  • B. Incorrect.

    This query is incorrect because it only specifies the schema and table but omits the catalog. A three-layer namespace requires all three components: catalog, schema, and table.

  • C. Correct.

    This query is correct because it includes all three components of the three-layer namespace: catalog (main), schema (sales), and table (transactions).

  • D. Incorrect.

    This query is incorrect because it omits the schema, which is required when referencing a table in a three-layer namespace.

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