great-expectations / great_expectations

Always know what to expect from your data.
https://docs.greatexpectations.io/
Apache License 2.0
9.99k stars 1.54k forks source link

data docs rendering bug for UnexpectedRowsExpectation #10547

Open VolkovGeoPhy opened 3 weeks ago

VolkovGeoPhy commented 3 weeks ago

Describe the bug https://docs.greatexpectations.io/docs/core/customize_expectations/use_sql_to_define_a_custom_expectation done as it described here. In any case it doesn't render it in correct way despite I can see correct results in json file.

To Reproduce Create any custom expectation as it described here. build docs.

Expected behavior A clear and concise description of what you expected to happen.

Environment (please complete the following information):

Additional context Screenshot 2024-09-30 at 17 44 07

adeola-ak commented 3 weeks ago

are you executing locally? can you share your script

VolkovGeoPhy commented 3 weeks ago

I've tried it in two ways. Locally and via airflow DAG + s3 storages.

    class ExpectNoGeometriesIntersect(gx.expectations.UnexpectedRowsExpectation):
        unexpected_rows_query: str = batch_query
        description: str = "No geometries should intersect with each other."

    logger.info(f"query={batch_query}")

    register_expectation(ExpectNoGeometriesIntersect)
    expectation = ExpectNoGeometriesIntersect()

    regular_suite.add_expectation(expectation)
VolkovGeoPhy commented 3 weeks ago

The issue exits in 1.2.0 as well @adeola-ak. Let me know if you need some additional info.

adeola-ak commented 2 weeks ago

hi there @VolkovGeoPhy thanks for reporting this. I was able to reproduce. I will escalate this and follow up with you shortly

adeola-ak commented 1 week ago

Hi there,

This issue has been added to our backlog, and our team will work on it, though we don’t have a timeline yet. If it’s something you’d like to see resolved sooner, you’re more than welcome to submit a contribution. Otherwise, please feel free to continue to check this issue for updates. Thank you!

iamamutt commented 3 days ago

I found that if I didn't set the description field in the expectation config then the content renders correctly. This seems to be the case not just for UnexpectedRowsExpectation but other types of expectation classes as well.