feat; add deprecation_date key to dbt_models metadata model#987
feat; add deprecation_date key to dbt_models metadata model#987scrambldchannel wants to merge 4 commits intoelementary-data:masterfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe dbt_models artifact is extended with seven new columns ( Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
👋 @scrambldchannel |
What
This is a quick attempt to address #986 by adding the column to the
upload_dbt_modelsmacro that populates thedbt_modelsmodel.I've also added the new column, and several other missing columns, the properties for the model.
Why
We, and presumably others, leverage this column as a way to flag upcoming model deprecation to developers and also to automatically remove models from our project. If we could have this column in
dbt_models, it would make analysis, and automated notifications to users easier. As far as I'm aware, there isn't a way to currently do this and I don't see a record of this being discussed previously.TODO / Questions
I still need to do some testing but thought I might as well create a draft PR to accompany the issue I raised in case this is a non starter.I've tested this locally and the resulting
deprecation_datecolumn picks up the value as expected. I've also run the integration tests against a postgres target successfully and will attach a log file.I will do some functional testing against Snowflake using a branch in my repo too.
I also need to think about the appropriate data type to use for this columnI think leaving this as is the right approach but happy to be contradicted
Summary by CodeRabbit
deprecation_date,patch_path,metadata_hash,unique_key,incremental_strategy,group_name, andaccess. These additions enhance model metadata tracking and capture additional configuration properties from dbt graph sources.