It's not exactly the same, but you can use
prefect-great-expectations
to run Great Expectations validations:
https://prefecthq.github.io/prefect-great-expectations/
See here for a look at the parameters you can pass to the run_checkpoint_validation Task.
I don't think we have a longer example available right now, but keep in mind Prefect 2 tasks are often simpler to work with than Prefect 1 tasks. With Prefect 1, you needed to first create an instance of the
RunGreatExpectationsValidation
task before calling it in a flow.
With Prefect 2, you just install the
prefect-great-expectations
collection, import the
run_checkpoint_validation
, and run it like you'd run any other Python function inside your flow.