Databricks-DA-Assoc Executing Queries with Databricks SQL Practice Question
A data analyst is writing a Databricks SQL query that needs to join a large table with a small table and then aggregate the results. To optimize performance, they want to ensure the small table is broadcasted. Which SQL hint syntax should they use in the query?
⚠ Common exam trap
The trap here is using hint names from other SQL engines like Hive's MAPJOIN, which are not valid in Databricks SQL.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
SELECT /*+ BROADCAST(small_table) */ ...
The BROADCAST hint in Databricks SQL is specified as /*+ BROADCAST(table_name) */ after SELECT. It directs the optimizer to broadcast the smaller table, avoiding a shuffle of the larger table. Other hints like MAPJOIN or BROADCASTJOIN are not supported.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
SELECT /*+ BROADCAST(small_table) */ ...
Why this is correct
The correct syntax for a broadcast hint in Databricks SQL is to include /*+ BROADCAST(table_alias) */ immediately after the SELECT keyword. This instructs the optimizer to broadcast the specified table. Using the table alias is important if the table is aliased in the query.
- ✗
SELECT /*+ MAPJOIN(small_table) */ ...
Why it's wrong here
MAPJOIN is a hint used in Hive and some other engines, but Databricks SQL does not support it. Using it would result in a syntax error or be ignored. The correct hint for Databricks SQL is BROADCAST, not MAPJOIN.
- ✗
SELECT /*+ SHUFFLE_HASH(small_table) */ ...
Why it's wrong here
SHUFFLE_HASH is a hint that forces a shuffle hash join, which would shuffle both tables. It does not broadcast the small table. This would not achieve the desired optimization and could lead to unnecessary data movement.
- ✗
SELECT /*+ BROADCASTJOIN(small_table) */ ...
Why it's wrong here
BROADCASTJOIN is not a valid hint in Databricks SQL. While it sounds similar to broadcast, the correct hint is simply BROADCAST. Using BROADCASTJOIN would not be recognized and may cause an error or be ignored, failing to optimize the join.
About these practice questions
This Databricks-DA-Assoc question is part of Courseiva's 291-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Databricks exam blueprint
This Databricks-DA-Assoc practice question is part of Courseiva's free Databricks certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the Databricks-DA-Assoc exam.