Skip to main content
Great Expectations hero Great expectations (GX) is an open-source Python library that allows you to define and check expectations for your data. Openlayer integrates with GX and you can use any GX expectation as an Openlayer test. Refer to the GX expectations gallery to check all the expectations supported.

Creating GX tests

To create a GX test, open your data source’s Create page, search for Great Expectations under All tests, and click it. The Create tests page searched for Great Expectations, with the Great Expectations test listed under All tests Then, after the modal is open, select the expectation you are interested in from the Expectation name dropdown. For example, let’s search for and select Expect column mean to be between (expect_column_mean_to_be_between). The Great Expectations test form with the Expectation name dropdown open and filtered to Expect column mean to be between Now, you need to provide the arguments required by the expectation. The link next to Expectation kwargs opens the documentation for the expectation selected. In this case, the expectation requires a column, with the name of the column, a min_value, and a max_value. Enter them as JSON in Expectation kwargs, for example {"column": "monthly_charges", "min_value": 20, "max_value": 120}. The Great Expectations test form with Expect column mean to be between selected and its column, min_value, and max_value kwargs entered as JSON The Threshold should be kept as Success is true, as the expectation will return True if the expectation is met (in this case, if the column mean is between the min_value and the max_value). Once you have added all the arguments, you can click on “Create test” to create the test. Refer to the GX expectations gallery to check all the expectations supported.