From 643de2a8f0edaf37930b8e101edf08b406741d03 Mon Sep 17 00:00:00 2001 From: Howard <139238193+howard-oc@users.noreply.github.com> Date: Wed, 10 Jul 2024 07:56:04 +0100 Subject: [PATCH] fix(freeshness_checks): changed build_freshness_checks_for_non_partitioned_assets to build_last_update_freshness_checks --- data_platform/assets.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/data_platform/assets.py b/data_platform/assets.py index d7c9d80..9b1892a 100644 --- a/data_platform/assets.py +++ b/data_platform/assets.py @@ -1,4 +1,6 @@ -from dagster import asset, MaterializeResult, asset_check, AssetCheckResult, AssetsDefinition, build_freshness_checks_for_non_partitioned_assets +from datetime import timedelta + +from dagster import asset, MaterializeResult, asset_check, AssetCheckResult, AssetsDefinition, build_last_update_freshness_checks import pandas as pd import data_platform.constants as constants import random @@ -430,9 +432,6 @@ def _asset_check() -> AssetCheckResult: generate_asset_check(asset, "valid_type") for asset in data_products ] - -freshness_checks = build_freshness_checks_for_non_partitioned_assets( - assets=data_products, - freshness_cron="0 0 * * *", - maximum_lag_minutes=60 * 24 +freshness_checks = build_last_update_freshness_checks( + assets=data_products, lower_bound_delta=timedelta(hours=2) ) \ No newline at end of file