CertLumen

Databricks Data Analyst Associate · Section 5 · 15% of the exam

Understand the Features, Benefits, and Supported Workloads of Photon.

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

What it covers

Learn what Photon is, which workloads it speeds up and which it cannot, how Query History saves development time, and how the result caches, disk cache and UI cache let Databricks SQL answer repeated queries faster.

Points to remember

  • Photon = Databricks-native vectorized C++ engine; Catalyst still plans; no code changes; unsupported operations fall back to Spark transparently.
  • Photon is the default engine of all SQL warehouses and is enabled on serverless compute and serverless pipelines; on classic compute it is the Use Photon Acceleration checkbox (runtime_engine = PHOTON).
  • Biggest Photon gains: large scans, joins, aggregations and Delta/Parquet writes (MERGE, CTAS); stateless streaming is supported.
  • No Photon for UDFs, RDD and Dataset APIs or stateful streaming; little gain for queries under about two seconds.
  • Query History filters: user, date range, compute, duration, status, statement type, statement ID, query tags; details show full text, duration breakdown and query source; Cancel stops a running query.

Try a question

An analyst is tuning a slow query on a serverless SQL warehouse and needs every test run to measure real execution time, but repeated runs keep returning cached results. Restarting the warehouse between runs did not help. What should she do?

  1. ARun CACHE SELECT * FROM the table before each test run so that the cached data is refreshed
  2. BSet spark.databricks.io.cache.enabled to false so that the warehouse stops caching
  3. CRun SET use_cached_result = false in the session she uses for testing
  4. DMove the tests to a classic SQL warehouse because it does not have a result cache
Show the answer

C. SET use_cached_result = false disables query result caching for the session; Databricks recommends it only for testing and benchmarking. Restarting did not help because the remote result cache of serverless warehouses is persisted as workspace system data and survives stops and restarts.

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

In the course

The lesson Photon, query history and caching teaches this objective (about 40 minutes), and 13 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 →