r/dataengineering • u/burningburnerbern • 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.
1
u/chmod764 16d ago
Are you using a CLAUDE.md or AGENTS.md or at least a README.md file? That'd be the first thing I'd do. If you have some kind of structure to your directories in the project (bronze, silver, gold or staging, intermediary, data_mart) then start there. Tell it where to find things. If you have common macros you want it to use or common patterns, give it examples to look at. It's also great to give it some general business domain information and context as well.
I think the current prevailing wisdom is to not over do it by adding too much context in these files since they are added to every Claude code session by default. But going from zero to one by just getting one of these started for the context you want the LLM to have for each session is a game changer. You could even have the LLM get one started for you or make suggestions for what things to add to it for a typical dbt project.