1. Exploring Databricks SQL
Hello there. In this video, I’ll be acting as a data analyst for a large coffee retail chain. My company recently adopted Databricks for our analytics, and I’m eager to familiarize myself with the platform.
Upon logging into the Databricks UI, I notice several SQL-friendly sections. To run my queries, I’ll create a small SQL Warehouse, selecting a 2X-Small Serverless option for simplicity and performance during development. Next, I’ll open the SQL Editor to view my coding environment, where I see my dataset, *coffee_sales*, in the catalog, along with its column details.
To start, I’ll write a classic `SELECT *` statement to return all records from this table. For convenience, I can click the three arrows next to the table name in the catalog pane to copy the correct syntax. Alternatively, I could write custom SQL queries. In this case, I want to create a bar chart visualizing the number of drinks sold by type to help forecast supplies. I’ll set the X-axis to drink type and use a count of rows as the aggregate on the Y-axis, then hit 'Save' to store my visual.
Next, I’m interested in analyzing revenue by payment mode. I’ll create a donut chart, setting payment mode as the X-axis and summing revenue on the Y-axis. Again, I’ll save this visual.
With two visuals ready, I’ll build a high-level dashboard to display them together. While I could use the Dashboards section in Databricks SQL, I’ll instead connect Power BI to Databricks. By navigating to Partner Connect in the left pane and selecting Power BI under the BI tools section, I can download a connection file to link directly to my SQL Warehouse and access the data.
Databricks SQL enables efficient data analysis, supporting a wide range of tasks within the platform.
2. empty