diff --git a/.changes/unreleased/Fixes-20240316-231152.yaml b/.changes/unreleased/Fixes-20240316-231152.yaml new file mode 100644 index 00000000000..725d8bbc3c5 --- /dev/null +++ b/.changes/unreleased/Fixes-20240316-231152.yaml @@ -0,0 +1,6 @@ +kind: Fixes +body: Handle exceptions for failing on-run-* hooks in source freshness +time: 2024-03-16T23:11:52.819014-07:00 +custom: + Author: aranke + Issue: "9511" diff --git a/core/dbt/artifacts/schemas/freshness/v3/freshness.py b/core/dbt/artifacts/schemas/freshness/v3/freshness.py index 5e8b4dabd30..a9b956d2863 100644 --- a/core/dbt/artifacts/schemas/freshness/v3/freshness.py +++ b/core/dbt/artifacts/schemas/freshness/v3/freshness.py @@ -107,7 +107,11 @@ class FreshnessExecutionResultArtifact( @classmethod def from_result(cls, base: FreshnessResult): - processed = [process_freshness_result(r) for r in base.results] + processed = [ + process_freshness_result(r) + for r in base.results + if isinstance(r, SourceFreshnessResult) + ] return cls( metadata=base.metadata, results=processed,