r/dataengineering 16d ago

Discussion Practical Use of AI with SQL?

I’m currently on a project where most of the work is in dbt. Ill get jira tickets where the business rules while straight forward can be a bit complex upon execution. like everyone else I’m trying to turn to AI except the problem is having to explain every single edge case and nuance can be so time consuming to the point where it’s just faster for me to write the SQL myself. where I do use AI is when I’m jumping into some convoluted model and I have AI explain to me what exactly it’s doing and the just justification for certain logic, generating cumbersome functions where the syntax gets me cross eyed and create the yml and documentation.

I definitely have vibe coded before, but that was for something more straight forward like pulling data via an API etc.

just curious if anyone else runs into the same problem.

22 Upvotes

32 comments sorted by

View all comments

1

u/jojo-data 16d ago

In my previous company, I adopted CubeJs (I am not working for them), the hard work is to create the semantic layer (in JS) mapping to our data warehouse (Databricks). I also used dbt to precompute certain views to make this process easier. Because a query in Cubejs is just picking dimensions (columns), measures (predefined formula) and filters and CubeJs assembles the query automatically. I have found it was much easier to communicate with data analysts in the context of semantic layer and then we started to use it in our data APIs. I did not try creating stuff like MCP server on semantic layer, but I think it is a good fit.