> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openlayer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Great Expectations

> Learn how to use Great Expectations with Openlayer

![Great Expectations hero](https://mintcdn.com/openlayer-44/zlWrng2mbxttdDP9/images/integrations/gx_hero.png?fit=max\&auto=format\&n=zlWrng2mbxttdDP9\&q=85\&s=87cc76be103355677a842a2fc5c66601)

[Great expectations](https://greatexpectations.io/) (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](https://greatexpectations.io/expectations)
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](https://mintcdn.com/openlayer-44/i_IVq7qGt9U6VbHF/images/integrations/great_expectations_test.png?fit=max\&auto=format\&n=i_IVq7qGt9U6VbHF\&q=85\&s=f05202f951d0c144ff713cff1d223aa3)

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](https://mintcdn.com/openlayer-44/i_IVq7qGt9U6VbHF/images/integrations/great_expectations_selection.png?fit=max\&auto=format\&n=i_IVq7qGt9U6VbHF\&q=85\&s=ff0a438e24a7bd82c8472a8c0ae1c47c)

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](https://mintcdn.com/openlayer-44/i_IVq7qGt9U6VbHF/images/integrations/great_expectations_config.png?fit=max\&auto=format\&n=i_IVq7qGt9U6VbHF\&q=85\&s=3bf6466df9123254ca0cbb1a0855965e)

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](https://greatexpectations.io/expectations)
to check all the expectations supported.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.