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

Support code_version for dbt seeds by default #25947

Open
goober opened this issue Nov 15, 2024 · 0 comments · May be fixed by #26071
Open

Support code_version for dbt seeds by default #25947

goober opened this issue Nov 15, 2024 · 0 comments · May be fixed by #26071
Labels

Comments

@goober
Copy link

goober commented Nov 15, 2024

What's the use case?

Seed assets in dbt does not provide a valid code_version.

Rationale

To be able to use the AutomationCondition.code_version_changed() condition to trigger a materialization when a seed file is updated.

Ideas of implementation

The current implementation of default_code_version_fn in DagsterDbtTranslator will only take the raw_sql or raw_code from the manifest.json into consideration when calculating the code version for a dbt asset. However, this value is empty for seed assets. With the latest release including #25387 makes it possible to handle this by overriding the get_code_version and return dbt_resource_props["checksum"]["checksum"] which is the file checksum for the seed csv.

Instead of forcing everyone that wants to handle a correct code_version for seed assets to override this function it is suggested that the default_code_verson_fn is updated to return the file checksum if it is available.

Additional information

If the improvement is accepted I would be happy to provide a PR.

Message from the maintainers

Impacted by this issue? Give it a 👍! We factor engagement into prioritization.

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