CertLumen

Databricks Data Analyst Associate · Section 4 · 20% of the exam

Explain the role a SQL Warehouse plays in query execution.

One of the objectives of the Databricks Certified Data Analyst Associate exam, in the section “Executing queries using Databricks SQL and Databricks SQL Warehouses”. Here is what it covers, the points to remember and a question to try.

What it covers

A SQL warehouse is the compute that runs every Databricks SQL query, whether it comes from the SQL editor, a dashboard, Genie or a BI tool. This lesson covers what happens when you click Run, the serverless, pro and classic types, size versus scaling, auto stop and permissions. It then shows how Genie Code, the new name of Databricks Assistant, helps you write, explain, fix and optimize queries in notebooks and the SQL editor.

Points to remember

  • A SQL warehouse is compute for Databricks SQL; data stays in cloud storage under Unity Catalog, so stopping a warehouse loses no data.
  • The SQL editor, AI/BI dashboards, alerts, Genie spaces, notebooks on a pro or serverless warehouse and BI tools over JDBC/ODBC all run their queries on a warehouse.
  • Serverless starts in about 2–6 seconds and has Photon, Predictive IO and IWM; pro has Photon and Predictive IO; classic has Photon only.
  • Genie, materialized views, streaming tables and Lakehouse Federation require a pro or serverless warehouse.
  • Cluster size controls the latency of each query; the maximum number of clusters controls concurrency (about one cluster per 10 concurrent queries).

Try a question

A data analyst runs a query in the SQL editor against a Unity Catalog table. A new colleague asks what the selected SQL warehouse contributes. Which statement best describes the role of the SQL warehouse?

  1. AIt is the storage layer that holds the table's data files, so the table is unavailable while the warehouse is stopped
  2. BIt is the Unity Catalog metastore that holds table definitions and grants, so each warehouse has its own set of catalogs
  3. CIt is the compute that plans and runs the query against the table's files in cloud storage, then returns results
  4. DIt only caches the results of queries that already ran; new queries are executed by the SQL editor in the browser
Show the answer

C. A SQL warehouse is the compute resource behind Databricks SQL. The SQL editor, dashboards, alerts, Genie and BI tools send SQL to it. It checks Unity Catalog privileges, plans the query, executes it with Photon against files in cloud object storage and returns the result. It stores no data, so stopping it loses nothing.

Written for practice in the style of the exam: never a question from the real exam.

In the course

The lesson SQL Warehouses and Genie Code (Databricks Assistant) teaches this objective (about 40 minutes), and 10 practice questions test it. The course has lessons, exam-style questions, timed practice exams and an AI tutor for every objective, and a pass prediction that tells you when you're ready to book.

More in this section

← Previous objective · All 39 objectives · Next objective →