Quick tips on Databricks SQL

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.

Article content

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:

Article content

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.

Article content

If you want to filter a column click on the triple dots next to the column name then choose Filter:

Article content

You can choose "Contains", or "Start with" and lots of other things. And you add OR condition too:

Article content

Tip #3: You can connect to Databricks SQL from Tableau, Power BI, dbt, Python. Just click on the “Connection Details” tab:

Article content

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:

Article content

 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

Like
Reply

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.

Like
Reply

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

To view or add a comment, sign in

More articles by Vincent Rainardi

  • Unstructured Data - From Conversational Files to Conversational Analytics

    For decades analytics is about tables, numbers and relational databases. It is about structured data, as we call it.

    3 Comments
  • Business Analyst

    Before I was a data architect, I was a data engineer. And before I was a data engineer, I was a business analyst.

    1 Comment
  • CDO and CIO: What's the difference?

    So CIO is Chief Data Officer. And CDO is Chief Data Officer.

  • Snowflake dbt Projects

    How does Snowflake dbt projects look like? It looks like this: Snowflake dbt Projects and Cortex Code On the left you…

  • Stupid Questions

    There is NO such thing as a stupid question. Why? Because asking questions is a good way to get knowledge.

  • The Science of (Data) Migration

    Say you have a data warehouse in SQL Server or Oracle, and you need to migrate it to Snowflake or Databricks. The…

    1 Comment
  • Cortex Search

    Cortex is the AI capability in Snowflake. Of all the Cortex features, Cortex Search is probably the least well known.

  • AI-ready data: what does it mean?

    JI am a practical person and when I hear people talking “fluffy cloud” words like “AI-ready data” I always try find out…

  • Interval Data Type

    We all know a data type called Date. And Time.

  • Row Timestamp

    In Snowflake, the Row Timestamp is a column that stores when each row was last updated. It’s a brand new feature, went…

Others also viewed

Explore content categories