• CASE WHEN
  • Posts
  • 🤖 MDS Chat w/ Matt #3 - SQLGlot

🤖 MDS Chat w/ Matt #3 - SQLGlot

A library with the potential to revolutionize how SQL-based tools are built

🤘 It's time for MDS Chat with Matt!

This week, I'm talking about SQLGlot— an open-source library from Toby Mao at Tobiko Data. I think SQLGlot has the potential to revolutionize how SQL-based libraries are built.

Here's why I'm excited:

1️⃣ SQLGlot can break down queries and extract their useful bits. That means it can parse columns, aliases, and tables from your query. At a high-level, you could 𝘵𝘩𝘦𝘰𝘳𝘦𝘵𝘪𝘤𝘢𝘭𝘭𝘺 use this to back-into a column-level lineage of your warehouse by analyzing SQL files... which is exactly what SQLMesh and others are doing.

2️⃣ SQLGlot can 𝘵𝘳𝘢𝘯𝘴𝘭𝘢𝘵𝘦 (or transpile) between dialects. Want to migrate Redshift to BigQuery? Give SQLGlot a shot to see if it can do most of the heavy lifting.

3️⃣ There are 𝘴𝘰 many features in this library, I think it will serve as the basis for innumerable SQL-based libraries going forward.

Read more about SQLGlot, SQLMesh, and the Tobiko Data team here: https://buff.ly/3sW3GtL 📕

Until next time!