Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
d9bd351
Initial commit for structure and prereqs
r34ctor Dec 12, 2025
cc0c4de
Fix tab structure
r34ctor Dec 12, 2025
16a0f45
Merge branch 'develop' into DOC-1187_add_expectation_with_api
r34ctor Dec 15, 2025
c236d4a
Create structure
r34ctor Dec 15, 2025
2f03274
Add steps
r34ctor Dec 16, 2025
6af1d26
Include example code
r34ctor Dec 16, 2025
a3367a4
Add steps for the suite
r34ctor Dec 16, 2025
ae209b1
Merge branch 'develop' into DOC-1187_add_expectation_with_api
r34ctor Dec 17, 2025
8702b3d
Add next steps and small clean up
r34ctor Dec 17, 2025
0b2621e
Fix link
r34ctor Dec 17, 2025
350628d
Fix link
r34ctor Dec 17, 2025
40089d2
Merge branch 'develop' into DOC-1187_add_expectation_with_api
r34ctor Dec 23, 2025
d3a6a07
Add prereq for cloud context
r34ctor Dec 23, 2025
3991a04
Update Expectation Suite description
r34ctor Dec 23, 2025
dade731
Update intro
r34ctor Dec 23, 2025
b0d3261
Add Expectations that are only configurable through the API
r34ctor Jan 5, 2026
efd00e0
Merge branch 'develop' into DOC-1187_add_expectation_with_api
r34ctor Jan 5, 2026
805dc6b
Move asterisks
r34ctor Jan 7, 2026
99fe384
Merge branch 'develop' into DOC-1187_add_expectation_with_api
r34ctor Jan 12, 2026
cc9501c
Clean up
r34ctor Jan 14, 2026
1c9f747
Merge branch 'develop' into DOC-1187_add_expectation_with_api
r34ctor Jan 14, 2026
481cd62
Add section for row conditions
r34ctor Jan 16, 2026
ccf8c89
Merge branch 'develop' into DOC-1187_add_expectation_with_api
r34ctor Jan 16, 2026
7e4e758
Merge branch 'develop' into DOC-1187_add_expectation_with_api
r34ctor Jan 20, 2026
4ba3cab
Clean up
r34ctor Jan 20, 2026
08a0993
Merge branch 'develop' into DOC-1187_add_expectation_with_api
r34ctor Jan 30, 2026
447c3f8
Apply suggestions from code review
r34ctor Jan 30, 2026
535570e
Add sample code to test suite
r34ctor Jan 30, 2026
26687b3
Remove full code example snippet
r34ctor Jan 30, 2026
53fa47b
Update anchor links
r34ctor Jan 30, 2026
47c5aaf
Remove prerequisites sub-headers
r34ctor Jan 30, 2026
d2d8934
Remove optional section
r34ctor Jan 30, 2026
ff470fe
Fix build problem?
r34ctor Jan 30, 2026
5abf813
Fix build problem?
r34ctor Jan 30, 2026
45953a7
Fix indent?
r34ctor Jan 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ import Tabs from '@theme/Tabs';

## Next steps

- [Add an Expectation](/cloud/expectations/manage_expectations.md#add-an-expectation).
- [Add an Expectation](/cloud/expectations/manage_expectations.md#create-an-expectation).
- [Run a Validation](/cloud/validations/run_validations.md).
2 changes: 1 addition & 1 deletion docs/docusaurus/docs/cloud/connect/connect_postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import Tabs from '@theme/Tabs';

## Next steps

- [Add an Expectation](/cloud/expectations/manage_expectations.md#add-an-expectation).
- [Add an Expectation](/cloud/expectations/manage_expectations.md#create-an-expectation).
- [Run a Validation](/cloud/validations/run_validations.md).


2 changes: 1 addition & 1 deletion docs/docusaurus/docs/cloud/connect/connect_redshift.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@ description: Connect GX Cloud to a Redshift Data Source.

## Next steps

- [Add an Expectation](/cloud/expectations/manage_expectations.md#add-an-expectation).
- [Add an Expectation](/cloud/expectations/manage_expectations.md#create-an-expectation).
- [Run a Validation](/cloud/validations/run_validations.md).

2 changes: 1 addition & 1 deletion docs/docusaurus/docs/cloud/connect/connect_s3.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ Keep the following limitations in mind when working with S3 Data Sources.

- S3 Data Source connections cannot be edited in the GX Cloud UI. Use the GX Cloud API if you need to [edit the connection](/cloud/data_sources/manage_data_sources.md#edit-data-source-settings).
- S3 Data Assets cannot be added through the GX Cloud UI. Use the GX Cloud API to [add more Data Assets](/docs/cloud/data_assets/manage_data_assets.md?interface=api#add-a-data-asset-from-an-existing-data-source) from your S3 Data Source.
- When you add an S3 Data Asset, Expectations for Anomaly Detection are not automatically generated. You can [generate Anomaly Detection Expectations](/docs/cloud/expectations/manage_expectations#add-an-expectation) after the Data Asset is created.
- When you add an S3 Data Asset, Expectations for Anomaly Detection are not automatically generated. You can [generate Anomaly Detection Expectations](/docs/cloud/expectations/manage_expectations#create-an-expectation) after the Data Asset is created.
- ExpectAI is not supported.
- Data Asset metrics are not automatically fetched. You can [manually profile data](/docs/cloud/data_assets/manage_data_assets.md#view-data-asset-metrics) to return all available metrics for an S3 Data Asset.
- Custom SQL and multi-source Expectations are not supported.
Expand Down
2 changes: 1 addition & 1 deletion docs/docusaurus/docs/cloud/connect/connect_snowflake.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ description: Connect GX Cloud to a Snowflake Data Source.

## Next steps

- [Add an Expectation](/cloud/expectations/manage_expectations.md#add-an-expectation).
- [Add an Expectation](/cloud/expectations/manage_expectations.md#create-an-expectation).
- [Run a Validation](/cloud/validations/run_validations.md).


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ To add a Data Asset from an existing Data Source using the GX Cloud API, complet

</Tabs>

Now you can [add an Expectation](/cloud/expectations/manage_expectations.md#add-an-expectation) for your new Data Asset.
Now you can [add an Expectation](/cloud/expectations/manage_expectations.md#create-an-expectation) for your new Data Asset.

## View Data Asset metrics

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
"""
This is an example script for creating an expectation with preset parameters.

To test, run:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this new code sample file needs to be added to docs/docusaurus/docs/components/examples_under_test.py to be tested as part of CI

pytest --docs-tests -k "doc_example_create_an_expectation_for_cloud" tests/integration/test_script_runner.py
"""


def set_up_context_for_example(context):
pass


# EXAMPLE SCRIPT STARTS HERE:
import great_expectations as gx

context = gx.get_context()
# Hide this
set_up_context_for_example(context)

# All Expectations are found in the `gx.expectations` module.
# This Expectation has all values set in advance:
# <snippet name="docs/docusaurus/docs/cloud/expectations/examples/create_an_expectation.py - preset expectation">
expectation = gx.expectations.ExpectColumnMaxToBeBetween(
column="passenger_count", min_value=1, max_value=6, severity="warning"
)
# </snippet>

# Expectations need to be added to an Expectation Suite before being associated with a Data Asset.
# Create the Expectation Suite and add it to your Data Context
# <snippet name="docs/docusaurus/docs/cloud/expectations/examples/create_an_expectation.py - create expectation suite">
suite_name = "my_expectation_suite"
suite = gx.ExpectationSuite(name=suite_name)
context.suites.add(suite)
# </snippet>

# Optional. If you have an existing Expectation Suite you'd like to use, get it from the Data Context.
# <snippet name="docs/docusaurus/docs/cloud/expectations/examples/create_an_expectation.py - get expectation suite">
existing_suite_name = (
"my_expectation_suite" # replace this with the name of your Expectation Suite
)
suite = context.suites.get(name=existing_suite_name)
# </snippet>

# Add the Expectation to the Expectation Suite.
# <snippet name="docs/docusaurus/docs/cloud/expectations/examples/create_an_expectation.py - add expectation to suite">
suite.add_expectation(expectation)
suite.save()
# </snippet>
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ The following table lists the available GX Cloud Expectations. Note that some Da
| Numeric | **column values to be between** | Expect the column entries to be between a minimum value and a maximum value. | No | No |
| Numeric | **column z scores to be less than** | Expect the Z-scores of a column's values to be less than a given threshold. | No | No |
| Numeric | **multicolumn sum to equal** | Expect that the sum of row values in a specified column list is the same for each row, and equal to a specified sum total. | No | No |
| Numeric | **column KL divergence to be less than*** | Expect the Kulback-Leibler (KL) divergence (relative entropy) of the specified column with respect to the partition object to be lower than the provided threshold. | No | No |
| Numeric | **column quantile values to be between*** | Expect the specific provided column quantiles to be between a minimum value and a maximum value. | No | No |
| Schema | **column to exist** | Checks for the existence of a specified column within a table or view. | No | No |
| Schema | **column values to be in type list** | Expect a column to contain values from a specified type list. | No | No |
| Schema | **column values to be of type** | Expect a column to contain values of a specified data type. | No | No |
Expand All @@ -46,6 +48,7 @@ The following table lists the available GX Cloud Expectations. Note that some Da
| Uniqueness | **select column values to be unique within record** | Expect the values for each record to be unique across the columns listed. Note that records can be duplicated. | No | No |
| Validity | **column most common value to be in set** | Expect the most common value to be within the designated value set. | No | No |
| Validity | **column pair values to be equal** | Expect the values in column A to be the same as column B. | No | No |
| Validity | **column pair values to be in set*** | Expect the paired values from columns A and B to belong to a set of valid pairs. | No | No |
| Validity | **column value lengths to be between** | Expect the column entries to be strings with length between a minimum value and a maximum value. | No | No |
| Validity | **column value lengths to equal** | Expect the column entries to be strings with length equal to the provided value. | No | No |
| Validity | **column values to be in set** | Expect each column value to be in a given set. | No | No |
Expand All @@ -62,6 +65,7 @@ The following table lists the available GX Cloud Expectations. Note that some Da
| Volume | **table row count to equal** | Expect the number of rows to equal a value. | No | No |
| Volume | **table row count to equal other table** | Expect the number of rows to equal the number in another table or view within the same database. | No | No |

*Configurable through only the GX Cloud API.

## Custom SQL Expectations

Expand Down Expand Up @@ -93,7 +97,7 @@ The percentage of identical rows is computed by dividing the number of matching
| 100 | 25 | 1 | 1% |
| 0 | 0 | 0 | 100% |

To create a Multi-source Expectation, [add the **expect query results to match comparison** Expectation](/cloud/expectations/manage_expectations.md#add-an-expectation) on the base Data Source. Each provided query should be written in the dialect of the associated Data Source.
To create a Multi-source Expectation, [add the **expect query results to match comparison** Expectation](/cloud/expectations/manage_expectations.md#create-an-expectation) on the base Data Source. Each provided query should be written in the dialect of the associated Data Source.

Keep the following limitations in mind when working with Multi-source Expectations:
- The comparison is limited to the first 200 rows of each query result. If you anticipate that a query will return more than 200 rows, use an `ORDER BY` clause to control what is surfaced first for comparison.
Expand All @@ -102,7 +106,7 @@ Keep the following limitations in mind when working with Multi-source Expectatio

## Anomaly Detection

Anomaly Detection Expectations evolve with your data to detect deviations from historical patterns. To speed up their creation, you can generate Anomaly Detection Expectations when you use the GX Cloud UI to [create new Data Assets](/cloud/data_assets/manage_data_assets.md#add-a-data-asset-from-an-existing-data-source) or [add Expectations](/cloud/expectations/manage_expectations.md#add-an-expectation). Note that [some Data Sources](/docs/cloud/data_sources/manage_data_sources.md#workflow-and-feature-support) don't support these options. All Data Sources support manual configuration of Anomaly Detection by adding Expectations with Dynamic Parameters or forecasted ranges.
Anomaly Detection Expectations evolve with your data to detect deviations from historical patterns. To speed up their creation, you can generate Anomaly Detection Expectations when you use the GX Cloud UI to [create new Data Assets](/cloud/data_assets/manage_data_assets.md#add-a-data-asset-from-an-existing-data-source) or [add Expectations](/cloud/expectations/manage_expectations.md#create-an-expectation). Note that [some Data Sources](/docs/cloud/data_sources/manage_data_sources.md#workflow-and-feature-support) don't support these options. All Data Sources support manual configuration of Anomaly Detection by adding Expectations with Dynamic Parameters or forecasted ranges.

### Dynamic Parameters

Expand Down
Loading
Loading