I'd like to request case insensitivity when looking for columns to add / remove.
I believe this applies more to DBs like Snowflake that display things in all caps by default (though the identifiers themselves are not actually in caps).
I'm definitely a Python rookie, but I tried changing
c for c in yaml_file_model_section["columns"] if c["name"] != column
to
c for c in yaml_file_model_section["columns"] if c["name"].lower() != column.lower()
in remove_columns_not_in_database()
and
if column.lower() not in model_columns:
to
if column.upper() not in model_columns:
in bootstrap_existing_model()
Currently, if I have the following in _stg_my_schema.yml:
dbt-osmosis yaml refactor will remove
_fivetran_synced
and add_FIVETRAN_SYNCED
, resulting in:I'd like to request case insensitivity when looking for columns to add / remove.
I believe this applies more to DBs like Snowflake that display things in all caps by default (though the identifiers themselves are not actually in caps).
I'm definitely a Python rookie, but I tried changing
c for c in yaml_file_model_section["columns"] if c["name"] != column
toc for c in yaml_file_model_section["columns"] if c["name"].lower() != column.lower()
inremove_columns_not_in_database()
and
if column.lower() not in model_columns:
toif column.upper() not in model_columns:
inbootstrap_existing_model()
and it seemed to do the trick for me for now.