Skip to content

How to run an asset check after an AssetObservation, without an AssetMaterialization? #27151

Answered by mmutso-boku
mmutso-boku asked this question in Q&A
Discussion options

You must be logged in to vote

Answering myself - after some initial testing, it seems the way to achieve this is to pass AssetCheckSpec to @asset decorator parameter check_specs, and then the AssetCheckResult can be yielded inside the decorated function.

This is also documented in Dagster docs https://docs.dagster.io/concepts/assets/asset-checks/define-execute-asset-checks#defining-checks-and-assets-together

I was so used to the "separate definitions" approcah that this didn't even occur to me.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mmutso-boku
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
area: asset-checks Related to Asset Checks
1 participant