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 46 forks source link

[Fix] Process sources only when source yaml is available #118

Closed armaandhull closed 6 months ago

armaandhull commented 7 months ago

Issue description: When running refactor, process any changes to source yaml only when it exists/is defined. It is quite common for intermediate and mart models to not have a source file defined.

How to reproduce Run refactor on a folder that contains schema yaml file but doesn't contain the source yaml file

Additional context Should fix #115

armaandhull commented 7 months ago

@z3z1ma please review when you get a chance

ryaminal commented 6 months ago

was running in to this same problem and made the same fix in my pipx env.

still not entirely sure what the problem is. i would run refactor once(on a fresh repo) and it would work with a few errors. then, run refactor again and this error popped up.

z3z1ma commented 6 months ago

This makes sense to me. I was partial to 'homogenizing' all the files (guaranteeing same structure and keys) but am not particular anymore. There was a prior commit I think that made this error possible. This looks like a valid way to exclude though.

yassun7010 commented 6 months ago

This PR is published?