You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
inDagsterDbtTranslator
will only take theraw_sql
orraw_code
from themanifest.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 theget_code_version
and returndbt_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.
The text was updated successfully, but these errors were encountered: