Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -110,6 +110,9 @@ class ExpectColumnDistinctValuesToBeInSet(ColumnAggregateExpectation):
Notes:
The success value for this expectation will match that of \
[ExpectColumnValuesToBeInSet](https://greatexpectations.io/expectations/expect_column_values_to_be_in_set).
The observed_value field is always None. To inspect violations, use unexpected_count and \
partial_unexpected_list (distinct column values not in value_set, capped at 20). When the \
Expectation passes, partial_unexpected_list is empty.

See Also:
[ExpectColumnDistinctValuesToContainSet](https://greatexpectations.io/expectations/expect_column_distinct_values_to_contain_set)
Expand Down Expand Up @@ -156,27 +159,9 @@ class ExpectColumnDistinctValuesToBeInSet(ColumnAggregateExpectation):
"exception_message": null
}},
"result": {{
"observed_value": [
1,
2,
4
],
"details": {{
"value_counts": [
{{
"value": 1,
"count": 1
}},
{{
"value": 2,
"count": 1
}},
{{
"value": 4,
"count": 1
}}
]
}}
"observed_value": null,
"unexpected_count": 0,
"partial_unexpected_list": []
}},
"meta": {{}},
"success": true
Expand All @@ -197,17 +182,11 @@ class ExpectColumnDistinctValuesToBeInSet(ColumnAggregateExpectation):
"exception_message": null
}},
"result": {{
"observed_value": [
"observed_value": null,
"unexpected_count": 1,
"partial_unexpected_list": [
1
],
"details": {{
"value_counts": [
{{
"value": 1,
"count": 3
}}
]
}}
]
}},
"meta": {{}},
"success": false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ class ExpectColumnDistinctValuesToContainSet(ColumnAggregateExpectation):

Exact fields vary depending on the values passed to result_format, catch_exceptions, and meta.

Notes:
The observed_value field is always None. To inspect violations, use missing_count and \
partial_missing_list (values in value_set not present among the column's distinct values, \
capped at 20).

See Also:
[ExpectColumnDistinctValuesToBeInSet](https://greatexpectations.io/expectations/expect_column_distinct_values_to_be_in_set)
[ExpectColumnDistinctValuesToEqualSet](https://greatexpectations.io/expectations/expect_column_distinct_values_to_equal_set)
Expand Down Expand Up @@ -145,27 +150,9 @@ class ExpectColumnDistinctValuesToContainSet(ColumnAggregateExpectation):
"exception_message": null
}},
"result": {{
"observed_value": [
1,
2,
4
],
"details": {{
"value_counts": [
{{
"value": 1,
"count": 1
}},
{{
"value": 2,
"count": 1
}},
{{
"value": 4,
"count": 1
}}
]
}}
"observed_value": null,
"missing_count": 0,
"partial_missing_list": []
}},
"meta": {{}},
"success": true
Expand All @@ -186,17 +173,13 @@ class ExpectColumnDistinctValuesToContainSet(ColumnAggregateExpectation):
"exception_message": null
}},
"result": {{
"observed_value": [
1
],
"details": {{
"value_counts": [
{{
"value": 1,
"count": 3
}}
"observed_value": null,
"missing_count": 3,
"partial_missing_list": [
2,
3,
4
]
}}
}},
"meta": {{}},
"success": false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ class ExpectColumnDistinctValuesToEqualSet(ColumnAggregateExpectation):

Exact fields vary depending on the values passed to result_format, catch_exceptions, and meta.

Notes:
The observed_value field is always None. To inspect violations, use unexpected_count and \
partial_unexpected_list (distinct column values not in value_set) and missing_count and \
partial_missing_list (values in value_set not present in the column). Each list is capped at 20.

See Also:
[ExpectColumnDistinctValuesToBeInSet](https://greatexpectations.io/expectations/expect_column_distinct_values_to_be_in_set)
[ExpectColumnDistinctValuesToContainSet](https://greatexpectations.io/expectations/expect_column_distinct_values_to_contain_set)
Expand Down Expand Up @@ -145,27 +150,11 @@ class ExpectColumnDistinctValuesToEqualSet(ColumnAggregateExpectation):
"exception_message": null
}},
"result": {{
"observed_value": [
1,
2,
4
],
"details": {{
"value_counts": [
{{
"value": 1,
"count": 1
}},
{{
"value": 2,
"count": 1
}},
{{
"value": 4,
"count": 1
}}
]
}}
"observed_value": null,
"unexpected_count": 0,
"missing_count": 0,
"partial_unexpected_list": [],
"partial_missing_list": []
}},
"meta": {{}},
"success": true
Expand All @@ -186,17 +175,17 @@ class ExpectColumnDistinctValuesToEqualSet(ColumnAggregateExpectation):
"exception_message": null
}},
"result": {{
"observed_value": [
"observed_value": null,
"unexpected_count": 1,
"missing_count": 3,
"partial_unexpected_list": [
1
],
"details": {{
"value_counts": [
{{
"value": 1,
"count": 3
}}
]
}}
"partial_missing_list": [
2,
3,
4
]
}},
"meta": {{}},
"success": false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"title": "Expect column distinct values to be in set",
"description": "Expect the set of distinct column values to be contained by a given set.\n\nExpectColumnDistinctValuesToBeInSet is a Column Aggregate Expectation.\n\nColumn Aggregate Expectations are one of the most common types of Expectation.\nThey are evaluated for a single column, and produce an aggregate Metric, such as a mean, standard deviation, number of unique values, column type, etc.\nIf that Metric meets the conditions you set, the Expectation considers that data valid.\n\nArgs:\n column (str): The column name.\n value_set (set-like): A set of objects used for comparison.\n\nOther Parameters:\n result_format (str or None): Which output mode to use: BOOLEAN_ONLY, BASIC, COMPLETE, or SUMMARY. For more detail, see [result_format](https://docs.greatexpectations.io/docs/reference/expectations/result_format).\n catch_exceptions (boolean or None): If True, then catch exceptions and include them as part of the result object. For more detail, see [catch_exceptions](https://docs.greatexpectations.io/docs/reference/expectations/standard_arguments/#catch_exceptions).\n meta (dict or None): A JSON-serializable dictionary (nesting allowed) that will be included in the output without modification. For more detail, see [meta](https://docs.greatexpectations.io/docs/reference/expectations/standard_arguments/#meta).\n severity (str or None): The impact of this Expectation failing: critical, warning, or info. Defaults to critical if not set. Severity levels can be used to trigger different alerting patterns and actions. For more detail, see [failure severity](https://docs.greatexpectations.io/docs/cloud/expectations/expectations_overview/#failure-severity).\n\nReturns:\n An [ExpectationSuiteValidationResult](https://docs.greatexpectations.io/docs/terms/validation_result)\n\n Exact fields vary depending on the values passed to result_format, catch_exceptions, and meta.\n\nNotes:\n The success value for this expectation will match that of [ExpectColumnValuesToBeInSet](https://greatexpectations.io/expectations/expect_column_values_to_be_in_set).\n\nSee Also:\n [ExpectColumnDistinctValuesToContainSet](https://greatexpectations.io/expectations/expect_column_distinct_values_to_contain_set)\n [ExpectColumnDistinctValuesToEqualSet](https://greatexpectations.io/expectations/expect_column_distinct_values_to_equal_set)\n\nSupported Data Sources:\n [Pandas](https://docs.greatexpectations.io/docs/application_integration_support/)\n [Spark](https://docs.greatexpectations.io/docs/application_integration_support/)\n [SQLite](https://docs.greatexpectations.io/docs/application_integration_support/)\n [PostgreSQL](https://docs.greatexpectations.io/docs/application_integration_support/)\n [Amazon Aurora PostgreSQL](https://docs.greatexpectations.io/docs/application_integration_support/)\n [Citus](https://docs.greatexpectations.io/docs/application_integration_support/)\n [AlloyDB](https://docs.greatexpectations.io/docs/application_integration_support/)\n [Neon](https://docs.greatexpectations.io/docs/application_integration_support/)\n [MySQL](https://docs.greatexpectations.io/docs/application_integration_support/)\n [SQL Server](https://docs.greatexpectations.io/docs/application_integration_support/)\n [BigQuery](https://docs.greatexpectations.io/docs/application_integration_support/)\n [Snowflake](https://docs.greatexpectations.io/docs/application_integration_support/)\n [Databricks (SQL)](https://docs.greatexpectations.io/docs/application_integration_support/)\n [Redshift](https://docs.greatexpectations.io/docs/application_integration_support/)\n\nData Quality Issues:\n Uniqueness\n\nExample Data:\n test test2\n 0 1 1\n 1 2 1\n 2 4 1\n\nCode Examples:\n Passing Case:\n Input:\n ExpectColumnDistinctValuesToBeInSet(\n column=\"test\",\n value_set=[1, 2, 3, 4, 5]\n )\n\n Output:\n {\n \"exception_info\": {\n \"raised_exception\": false,\n \"exception_traceback\": null,\n \"exception_message\": null\n },\n \"result\": {\n \"observed_value\": [\n 1,\n 2,\n 4\n ],\n \"details\": {\n \"value_counts\": [\n {\n \"value\": 1,\n \"count\": 1\n },\n {\n \"value\": 2,\n \"count\": 1\n },\n {\n \"value\": 4,\n \"count\": 1\n }\n ]\n }\n },\n \"meta\": {},\n \"success\": true\n }\n\n Failing Case:\n Input:\n ExpectColumnDistinctValuesToBeInSet(\n column=\"test2\",\n value_set=[3, 2, 4]\n )\n\n Output:\n {\n \"exception_info\": {\n \"raised_exception\": false,\n \"exception_traceback\": null,\n \"exception_message\": null\n },\n \"result\": {\n \"observed_value\": [\n 1\n ],\n \"details\": {\n \"value_counts\": [\n {\n \"value\": 1,\n \"count\": 3\n }\n ]\n }\n },\n \"meta\": {},\n \"success\": false\n }",
"description": "Expect the set of distinct column values to be contained by a given set.\n\nExpectColumnDistinctValuesToBeInSet is a Column Aggregate Expectation.\n\nColumn Aggregate Expectations are one of the most common types of Expectation.\nThey are evaluated for a single column, and produce an aggregate Metric, such as a mean, standard deviation, number of unique values, column type, etc.\nIf that Metric meets the conditions you set, the Expectation considers that data valid.\n\nArgs:\n column (str): The column name.\n value_set (set-like): A set of objects used for comparison.\n\nOther Parameters:\n result_format (str or None): Which output mode to use: BOOLEAN_ONLY, BASIC, COMPLETE, or SUMMARY. For more detail, see [result_format](https://docs.greatexpectations.io/docs/reference/expectations/result_format).\n catch_exceptions (boolean or None): If True, then catch exceptions and include them as part of the result object. For more detail, see [catch_exceptions](https://docs.greatexpectations.io/docs/reference/expectations/standard_arguments/#catch_exceptions).\n meta (dict or None): A JSON-serializable dictionary (nesting allowed) that will be included in the output without modification. For more detail, see [meta](https://docs.greatexpectations.io/docs/reference/expectations/standard_arguments/#meta).\n severity (str or None): The impact of this Expectation failing: critical, warning, or info. Defaults to critical if not set. Severity levels can be used to trigger different alerting patterns and actions. For more detail, see [failure severity](https://docs.greatexpectations.io/docs/cloud/expectations/expectations_overview/#failure-severity).\n\nReturns:\n An [ExpectationSuiteValidationResult](https://docs.greatexpectations.io/docs/terms/validation_result)\n\n Exact fields vary depending on the values passed to result_format, catch_exceptions, and meta.\n\nNotes:\n The success value for this expectation will match that of [ExpectColumnValuesToBeInSet](https://greatexpectations.io/expectations/expect_column_values_to_be_in_set).\n The observed_value field is always None. To inspect violations, use unexpected_count and partial_unexpected_list (distinct column values not in value_set, capped at 20). When the Expectation passes, partial_unexpected_list is empty.\n\nSee Also:\n [ExpectColumnDistinctValuesToContainSet](https://greatexpectations.io/expectations/expect_column_distinct_values_to_contain_set)\n [ExpectColumnDistinctValuesToEqualSet](https://greatexpectations.io/expectations/expect_column_distinct_values_to_equal_set)\n\nSupported Data Sources:\n [Pandas](https://docs.greatexpectations.io/docs/application_integration_support/)\n [Spark](https://docs.greatexpectations.io/docs/application_integration_support/)\n [SQLite](https://docs.greatexpectations.io/docs/application_integration_support/)\n [PostgreSQL](https://docs.greatexpectations.io/docs/application_integration_support/)\n [Amazon Aurora PostgreSQL](https://docs.greatexpectations.io/docs/application_integration_support/)\n [Citus](https://docs.greatexpectations.io/docs/application_integration_support/)\n [AlloyDB](https://docs.greatexpectations.io/docs/application_integration_support/)\n [Neon](https://docs.greatexpectations.io/docs/application_integration_support/)\n [MySQL](https://docs.greatexpectations.io/docs/application_integration_support/)\n [SQL Server](https://docs.greatexpectations.io/docs/application_integration_support/)\n [BigQuery](https://docs.greatexpectations.io/docs/application_integration_support/)\n [Snowflake](https://docs.greatexpectations.io/docs/application_integration_support/)\n [Databricks (SQL)](https://docs.greatexpectations.io/docs/application_integration_support/)\n [Redshift](https://docs.greatexpectations.io/docs/application_integration_support/)\n\nData Quality Issues:\n Uniqueness\n\nExample Data:\n test test2\n 0 1 1\n 1 2 1\n 2 4 1\n\nCode Examples:\n Passing Case:\n Input:\n ExpectColumnDistinctValuesToBeInSet(\n column=\"test\",\n value_set=[1, 2, 3, 4, 5]\n )\n\n Output:\n {\n \"exception_info\": {\n \"raised_exception\": false,\n \"exception_traceback\": null,\n \"exception_message\": null\n },\n \"result\": {\n \"observed_value\": null,\n \"unexpected_count\": 0,\n \"partial_unexpected_list\": []\n },\n \"meta\": {},\n \"success\": true\n }\n\n Failing Case:\n Input:\n ExpectColumnDistinctValuesToBeInSet(\n column=\"test2\",\n value_set=[3, 2, 4]\n )\n\n Output:\n {\n \"exception_info\": {\n \"raised_exception\": false,\n \"exception_traceback\": null,\n \"exception_message\": null\n },\n \"result\": {\n \"observed_value\": null,\n \"unexpected_count\": 1,\n \"partial_unexpected_list\": [\n 1\n ]\n },\n \"meta\": {},\n \"success\": false\n }",
"type": "object",
"properties": {
"id": {
Expand Down
Loading
Loading