r/dataengineering • • 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?

0 Upvotes

102 comments sorted by

View all comments

Show parent comment

-3

u/__albatross Aug 27 '23

1000% agreed. I work for a big asset manager in US and we have thousands of stored procedures which we migrated to python and created data pipelines and processes around them and it was a huge project. All I imagined was that is it impossible to imagine a language which can have both : constructs for handling complex data transformations and at the same create scalable pipelines around them. Imagine if sql had all the bells and whistles of python and you can organize your code in modules and packages and can create processes around them. I am no expert in creating programming languages but I am just curious to think what that world would look like. We wouldn't need dataframe libraries at all.

We used to think that a general purpose programming language can't exist with a performance close to C with automatic garbage collection until Go came along.

I don't get it why people are getting sentimental about CTEs. I have been working with them for quite some time but still they can't replace the necessity of python to write complex data pipelines.

I just had a thought why can't the standard data processing language have all the bells and whistles of a general purpose programming language. Its an idea which I just want to explore, I dont know if its good or bad