Closed jaredx435k2d0 closed 1 year ago
Similarly, when removing an extra column from a yml file, the empty line separating tables will be removed:
Before:
models:
- name: first_table
description: ""
columns:
- name: id
- name: extra_column_to_remove
- name: second_table
description: ""
columns:
- name: id
- name: other_column
After:
models:
- name: first_table
description: ""
columns:
- name: id
- name: second_table
description: ""
columns:
- name: id
- name: other_column
This really boils down to the internals of ruamel.yaml
which is the de/serialization library that manages the yaml. I am not sure how deeply I can tune that. I am going to close this as it is not an issue with the package but I am open to revisiting later as a feature/improvement request. Between now and then, I may have time to delve more into the knobs available in ruamel.yaml.
If I run dbt-osmosis yaml refactor on an existing source, and a column has been added to a table since the last time I ran it, it's added like this:
Additional context python 3.9.16 macOS 13.2 (22D49) Snowflake 7.3.1 dbt-core==1.3.2 dbt-extractor==0.4.1 dbt-osmosis==0.9.8 dbt-snowflake==1.3.0