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

Add get_code_version to DagsterDbtTranslator #25387

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Grzyblon
Copy link

Summary & Motivation

I wanted to use AutomationCondition.code_version_changed with dbt seeds. Unfortunately, from what I was able to determine, code_version is not set for seeds. Or maybe I should say it is, but all seeds have same value because function default_code_version_fn, that is used as a default, sets it based on “raw_sql” or “raw_code” from dbt_resource_props and what I saw for seeds, value of those is an empty string. That wouldn’t be a problem if there was a function like get_code_version in DagsterDbtTranslator that one can override. I didn’t find any open issue on that topic, so I decided to try to implement that.

It’s the first time I’m contributing to any open-source project. I tried to do my best to comply to any standards I could find so please be understanding 😊

How I Tested These Changes

I’ve added unit tests similar to other properties override by DagsterDbtTranslator like group_names in unit test test_with_group_replacements of test_asset_decorator.py module.

Changelog

Allow DagsterDbtTranslator to customize code_version

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.

1 participant