GX Version: 0.18.8
Python version: 3.11.5
OS: Debian 12
We have an expectation based on a big regular expression not easily understandable. We would want to edit the result of the rapport to display “This does not match the ISO format”.
Reproduction:
kwargs = {
"column": key,
"regex": r"^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))"
r"?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|"
r"[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])"
r"((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)(\17[0-5]\d([\.,]\d+)?)"
r"?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$",
}
return ExpectationConfiguration(
"expect_column_values_to_match_regex",
kwargs,
meta={
"notes": {
"format": "markdown",
"content": ["#### date must be in ISO8601 format"],
}
}
)
Then build the GX report. And then check the expectation suite and the report generated.
If you need any more info, I will provide more.