Hi dear GX team.
Currently I am trying to define several custom expectations that inherited from the build-in expectations.
If I directly put these expectations in the suite json file, GX context could not find the expectation because it is not a expectation belongs to core. This could be understood. But the question is how could I register these custom expectations to let GX core be aware of them. I found that in early version of core(such 0.14.13), register custom expectations is mentioned in such doc(How to use a Custom Expectation | Great Expectations). Seems that in early version we could place the custom expectations in ‘plugin’ within our deployment. But in latest GX core, I did not find such topic is mentioned. So could anyone give me a hint on how to implement this.
This solution worked for me.
expectation_path = "./great_expectations/expectations/ge_attribute.json"
if os.path.exists(expectation_path):
with open(expectation_path) as json_file:
suite_json = json.load(json_file)
self.expectation_suite = ge.ExpectationSuite(**suite_json)