Quick tips on Databricks SQL
Before we start, if you haven’t used Databricks before, you can try it for free. Just head to www.databricks.com and click on “Try Databricks” at the top.
ok let’s start.
Databricks SQL is just like a normal RDBMS. Gone are those PySpark interfaces where you write Python scripts to invoke the Spark engine. Databricks SQL looks pretty much like SQL Server / Synapse (SSMS), Oracle (Toad) and Snowflake. Have a look below the SQL Editor below.
If you are using laptop like me and you need more space, you can click on the 3 horizontal lines at the top left corner of the screen (marked with red arrow above). And also the X next to the Catalog at the top of the screen (also marked with red arrow). With those 2 panes gone, your screen estate becomes bigger and now you have plenty of space:
Second tip: searching through the result.
See the magnifying glass at red arrow number 1 below? Click it. Then type “reeves” on the search box (red arrow #2) and voila the cell containing suzannereeves are immediately highlighted! Very easy to search within the result without even leaving the SQL Editor.
If you want to filter a column click on the triple dots next to the column name then choose Filter:
Recommended by LinkedIn
You can choose "Contains", or "Start with" and lots of other things. And you add OR condition too:
Tip #3: You can connect to Databricks SQL from Tableau, Power BI, dbt, Python. Just click on the “Connection Details” tab:
Note: Just like in Snowflake, Databricks also call their SQL engine/compute as a “warehouse”. So “SQL Warehouse” in Databricks speak means “SQL Engine”.
If you need to connect from Qlik, Matillion, Dataiku, Fivetran, Informatica, Hevo, Rivery just click on the “More tools” (arrow #2 above). You can even connect from ERWin (yes, the modelling tool) and Alation (the data catalog tool).
Tip #4: use the tool tip.
As you type your SQL, tool tip will pop up allowing you to choose the table names like below:
List of my articles: https://lnkd.in/eRTNN6GP
I hope this email finds you well. I'm reaching out to schedule a meeting to discuss our mutual opportunity. Please let me know your availability for meeting in the next two weeks. Seamlessly access, ingest, transform, model, analyze and build data products, transforming untapped data into valuable revenue streams. Thank you, Joe Tinaglia Director of Business Development Arivonix.com
Couple of very interesting features I have seen: Call/invoke LLMs and general AI within a SELECT statement. Using LLMs and AI as though they are inbuilt functions. Like in snowflake, use lateral columns alias in the SELECT statement.
To add to the list of amazing tips you mentioned, I loved the query formatter located in the kebab of the New Query window. With that, users can just write the SQL query and then invoke the formatter to format the query nicely enhancing readability
Interesting