Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Dec 7, 2023
Merged

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

merged 1 commit into from
Dec 7, 2023

Conversation

armaandhull
Copy link

@armaandhull armaandhull commented Nov 22, 2023

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

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@armaandhull armaandhull changed the title [Fix] Add sources to target_schema only if available [Fix] Process sources only when source yaml is available Nov 22, 2023
@armaandhull
Copy link
Author

@z3z1ma please review when you get a chance

@ryaminal
Copy link

ryaminal commented Dec 6, 2023

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
Copy link
Owner

z3z1ma commented Dec 7, 2023

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.

@z3z1ma z3z1ma merged commit 784fa82 into z3z1ma:main Dec 7, 2023
@yassun7010
Copy link
Contributor

yassun7010 commented Dec 14, 2023

This PR is published?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

KeyError: 'sources'
4 participants