Replies: 2 comments 1 reply
-
answer in description |
Beta Was this translation helpful? Give feedback.
-
Thank you very much for the detailed description! I am trying to implement such a freshness check logic with a sensor on the freshness checks (via the provided build_sensor_for_freshness_checks function), however, the sensor does not find the asset that the asset check is attached to in the Definitions object. All of the assets have dynamic partitions. This is the issue I created for the bug: ISSUE In order to reproduce the situation, here is a minimal example with dagster 1.7.1, where the code location contains the following code alone in the _init_.py file:
My experiments suggest, that the issue occurs when the second asset has a DynamicParititonsDefinition with a name that precedes that of the first asset in the alphabet. If you swap the names in the example below, the error disappears. This is just an empirical finding, to hint at a direction. Please take a look at this issue and propose a way how to proceed. |
Beta Was this translation helpful? Give feedback.
-
We don't currently have full partitions support for asset checks. In the meantime, you can construct an asset check which checks all partitions of a given asset. Here's a code example to demonstrate how to do this for freshness specifically.
When constructed in this way, the freshness check can be passed to the
build_freshness_check_sensor
API, which will automatically run the custom freshness check for you.Note that if you make a blocking asset check in this style, it will block all downstream partitions, not just the ones that failed.
Beta Was this translation helpful? Give feedback.
All reactions