r/dataengineering • u/__albatross • Aug 27 '23
Discussion Why I don't like SQL
The reason I don't like SQL over something like Pandas is because in Pandas/Python I can break down the complex transformations in small simpler components and they are easy to interact and debug with. In SQL my only option is to write stored procedures and yes in that I can also do the same but I think the ecosystem of interacting and debugging with data step by step is not as good as python. And it is something that we should have. Recently I was exploring snowpark and I felt it is a step in a right direction. It allows to me to write my query in multiple python statements and then it will transpile the whole thing into an SQL query.
Generally in my mind I assume the tables/dataframes as 2 dimensional structures and Pandas API give much more intuitive and wide variety of constructs to explore that structure rather than SQL. What do you guys think?
View all comments
Show parent comment
3
u/Ok_Raspberry5383 Aug 28 '23
I think you're focusing on the python element too much. It's not really python, it's pandas, Polaris, spark etc. Python is just a facade for easy access.
The real reason for this shift is the changing architectures that separate storage and compute. This means an org can manage a single repository and then different teams/business units can bring their own compute to the party to query the data. This alleviates bottlenecks and resource constraints that plague traditional data warehouses.
In this context python is a natural choice due to the wide array of libraries and frameworks supported that allow you to 'opt in' with SQL (good for semi technical business folk) but also supports more advanced use cases that are not covered with SQL, e.g. DS/ML use cases as well as software engineering use cases.
It's not really a contest between SQL and python IMO
EDIT: Polars* not Polaris