Replies: 1 comment
-
Trying saving the suite after you add the expectations |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I’m encountering an issue when trying to add multiple expectations for a single column in my Great Expectations suite. Specifically, when I add a new expectation for the column my_col, only the first expectation is considered, and the subsequent ones are ignored.
here is how i defined the suite and expectations:
suite_name = “suite_name”
suite = ge.ExpectationSuite(suite_name)
suite = context.suites.add(suite)
suite.add_expectation(ge.expectations.ExpectColumnValuesToNotBeNull(column=‘myCol’))
suite.add_expectation(ge.expectations.ExpectColumnValuesToBeUnique(column=‘myCol’))
vd = ge.ValidationDefinition(
name=“my_vd”,
data=batch,
suite=suite,
)
checkpoint = ge.Checkpoint(
name=“my_checkpoint”,
validation_definitions=[vd],
actions=[ge.checkpoint.UpdateDataDocsAction(name=“update_data_docs”)]
)
context.validation_definitions.add(vd)
context.checkpoints.add(checkpoint)
results = checkpoint.run(batch_parameters={“dataframe”: df})
Beta Was this translation helpful? Give feedback.
All reactions