Home / Data Analyst practice test / Working with Dashboards and Visualizations in Databricks / Question

Databricks Data Analyst Associate · free practice question

After running a SQL query in the Databricks SQL editor, a data analyst wants to create a bar chart from the result set. What is the correct built-in way to…

Exam-style question on Working with Dashboards and Visualizations in Databricks from the free Data Analyst practice test, with the answer and a full explanation below.

Updated November 10, 2026

Working with Dashboards and Visualizations in Databricks

After running a SQL query in the Databricks SQL editor, a data analyst wants to create a bar chart from the result set. What is the correct built-in way to create the chart without leaving the SQL editor?

  1. AExport the query result to a CSV, open it in a local spreadsheet application, create the bar chart there, and then upload it back as an image widget on an AI/BI dashboard canvas
  2. BClick the '+' tab next to the Results tab in the SQL editor to add a new visualization, then configure the chart type and column mappings in the visualization editor panel
  3. CCopy the result set into a Python notebook cell, convert it to a Spark DataFrame, call display(df) on it, and configure the resulting interactive chart from the display() output area
  4. DNavigate to the AI/BI Dashboards page, create a new dashboard, paste the SQL statement as a new dataset, and then add and configure a visualization widget on the dashboard canvas
  5. EAdd a PLOT TYPE='bar' XAXIS=col1 YAXIS=col2 clause at the end of the SQL query before re-running it, which causes Databricks to render the bar chart automatically below the results grid
Answer & explanation

Correct answer: B

WHY B: In the Databricks SQL editor, after running a query, you click the '+' tab next to the Results tab to create a new visualization directly from the result set. The visualization editor lets you choose the chart type (bar, line, scatter, etc.) and configure column mappings — all without leaving the SQL editor. WHY NOT A: Exporting to CSV and using external tools is a valid workaround but is not the built-in SQL editor workflow for creating visualizations. WHY NOT C: While display() works in a separate Python notebook, it requires a different environment and converting the result set to a DataFrame; this bypasses the SQL editor's native visualization feature. WHY NOT D: Navigating to AI/BI Dashboards is a separate product surface and is not required for creating a quick visualization from the SQL editor. WHY NOT E: There is no PLOT keyword in Databricks SQL syntax; chart creation uses the UI editor, not SQL-level keywords.

Take the full Data Analyst practice test free →

Would you pass today?

This question is one of 45 in the free, timed Databricks Data Analyst Associate practice test. Take it and get a section-by-section score.

Start the free test →