z3z1ma / dbt-osmosis

Provides automated YAML management, a dbt server, streamlit workbench, and git-integrated dbt model output diff tools
https://z3z1ma.github.io/dbt-osmosis/
Apache License 2.0
422 stars 45 forks source link

Add or update columns data type even if undocumented_columns does not exist #98

Closed syou6162 closed 9 months ago

syou6162 commented 9 months ago

Resolves https://github.com/z3z1ma/dbt-osmosis/issues/90 FYI @waligob

dbt-osmosis adds or modifies the data_type when undocumented_columns exist.

However, even if there's no need to modify the column's description, having the data_type listed in the yaml is convenient for understanding the type, and the type might also change. In this pull request, the data_type will be added or modified even if there are no undocumented_columns.

You can also use the --force-inheritance option, but if you manually wrote the column's description, they will be erased. In such cases, you can't use the --force-inheritance option, so I believe a modification like the one in this pull request is necessary.

syou6162 commented 9 months ago

@z3z1ma Could you review this pull request?

z3z1ma commented 9 months ago

Looks good! Super useful for kickstarting populating of the type data.

FYI @connor-lough