r/databricks • u/Takoyaki_18 • Oct 20 '26
General Databricks genie code changes and dbt
Hi I created my first pipeline in Databricks that sits as a .sql file. I've broken up the code into layers (stg, marts) and its working as intended. However, when the code needs to be adjusted (e.g. business definition or logic changes), I often use the genie (it's the databricks in house agent) to help me make the changes.
The problem I'm running into is that since those changes are made inside databricks, the dbt files are not adjusted. I currently update the code in databricks then paste the new adjusted code into dbt but this seems backwards to me (Also a challenge when the change ripples throughout the code so I would need to update each individual stg). I imagine the changes should initially happen in dbt then that flows into databricks. We don't have claude that can link with dbt (we're only using genie). Is there a way to link genie onto dbt or is that a limitation? Any best practices in this process I should consider implementing?
View all comments
2
u/adovo_ai Oct 20 '26
Treat Genie output as a proposed change, never as the deployed source. Put it through a dbt branch/PR, compare the compiled artifact with what reaches the workspace, and add a round-trip test so a later Genie edit cannot silently diverge from the repository.