From 396dfb80733ed3400840b3e09ff1f3658194549f Mon Sep 17 00:00:00 2001 From: rreinoldsc <85508632+rreinoldsc@users.noreply.github.com> Date: Fri, 20 Sep 2024 16:05:34 -0400 Subject: [PATCH] [FEATURE] Add expectation windows for dynamic parameters (#10402) Co-authored-by: Robby Reinold Co-authored-by: Gabriel Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- great_expectations/checkpoint/checkpoint.py | 2 +- .../ExpectColumnDistinctValuesToBeInSet.json | 57 +++++++++++++++++++ ...xpectColumnDistinctValuesToContainSet.json | 57 +++++++++++++++++++ .../ExpectColumnDistinctValuesToEqualSet.json | 57 +++++++++++++++++++ .../ExpectColumnKLDivergenceToBeLessThan.json | 57 +++++++++++++++++++ .../schemas/ExpectColumnMaxToBeBetween.json | 57 +++++++++++++++++++ .../schemas/ExpectColumnMeanToBeBetween.json | 57 +++++++++++++++++++ .../ExpectColumnMedianToBeBetween.json | 57 +++++++++++++++++++ .../schemas/ExpectColumnMinToBeBetween.json | 57 +++++++++++++++++++ .../ExpectColumnMostCommonValueToBeInSet.json | 57 +++++++++++++++++++ ...pectColumnPairValuesAToBeGreaterThanB.json | 57 +++++++++++++++++++ .../ExpectColumnPairValuesToBeEqual.json | 57 +++++++++++++++++++ .../ExpectColumnPairValuesToBeInSet.json | 57 +++++++++++++++++++ ...mnProportionOfUniqueValuesToBeBetween.json | 57 +++++++++++++++++++ ...ExpectColumnQuantileValuesToBeBetween.json | 57 +++++++++++++++++++ .../schemas/ExpectColumnStdevToBeBetween.json | 57 +++++++++++++++++++ .../schemas/ExpectColumnSumToBeBetween.json | 57 +++++++++++++++++++ .../core/schemas/ExpectColumnToExist.json | 57 +++++++++++++++++++ ...pectColumnUniqueValueCountToBeBetween.json | 57 +++++++++++++++++++ .../ExpectColumnValueLengthsToBeBetween.json | 57 +++++++++++++++++++ .../ExpectColumnValueLengthsToEqual.json | 57 +++++++++++++++++++ .../ExpectColumnValueZScoresToBeLessThan.json | 57 +++++++++++++++++++ .../ExpectColumnValuesToBeBetween.json | 57 +++++++++++++++++++ .../schemas/ExpectColumnValuesToBeInSet.json | 57 +++++++++++++++++++ .../ExpectColumnValuesToBeInTypeList.json | 57 +++++++++++++++++++ .../schemas/ExpectColumnValuesToBeNull.json | 57 +++++++++++++++++++ .../schemas/ExpectColumnValuesToBeOfType.json | 57 +++++++++++++++++++ .../schemas/ExpectColumnValuesToBeUnique.json | 57 +++++++++++++++++++ .../ExpectColumnValuesToMatchLikePattern.json | 57 +++++++++++++++++++ ...ectColumnValuesToMatchLikePatternList.json | 57 +++++++++++++++++++ .../ExpectColumnValuesToMatchRegex.json | 57 +++++++++++++++++++ .../ExpectColumnValuesToMatchRegexList.json | 57 +++++++++++++++++++ .../ExpectColumnValuesToNotBeInSet.json | 57 +++++++++++++++++++ .../ExpectColumnValuesToNotBeNull.json | 57 +++++++++++++++++++ ...pectColumnValuesToNotMatchLikePattern.json | 57 +++++++++++++++++++ ...ColumnValuesToNotMatchLikePatternList.json | 57 +++++++++++++++++++ .../ExpectColumnValuesToNotMatchRegex.json | 57 +++++++++++++++++++ ...ExpectColumnValuesToNotMatchRegexList.json | 57 +++++++++++++++++++ .../ExpectCompoundColumnsToBeUnique.json | 57 +++++++++++++++++++ .../schemas/ExpectMulticolumnSumToEqual.json | 57 +++++++++++++++++++ ...ectColumnValuesToBeUniqueWithinRecord.json | 57 +++++++++++++++++++ .../ExpectTableColumnCountToBeBetween.json | 57 +++++++++++++++++++ .../ExpectTableColumnCountToEqual.json | 57 +++++++++++++++++++ .../ExpectTableColumnsToMatchOrderedList.json | 57 +++++++++++++++++++ .../schemas/ExpectTableColumnsToMatchSet.json | 57 +++++++++++++++++++ .../ExpectTableRowCountToBeBetween.json | 57 +++++++++++++++++++ .../schemas/ExpectTableRowCountToEqual.json | 57 +++++++++++++++++++ .../ExpectTableRowCountToEqualOtherTable.json | 57 +++++++++++++++++++ .../schemas/UnexpectedRowsExpectation.json | 57 +++++++++++++++++++ .../expectations/expectation.py | 5 +- .../expectations/model_field_descriptions.py | 1 + great_expectations/expectations/window.py | 28 +++++++++ pyproject.toml | 1 + .../core/test_core_model_schemas.py | 2 +- .../core/test_expectation_serialization.py | 39 ++++++++++--- tests/expectations/test_expectation.py | 54 ++++++++++++++++++ .../cloud/rest_contracts/conftest.py | 2 +- 57 files changed, 2858 insertions(+), 12 deletions(-) create mode 100644 great_expectations/expectations/window.py diff --git a/great_expectations/checkpoint/checkpoint.py b/great_expectations/checkpoint/checkpoint.py index a34b70219a7b..6242c8d719ae 100644 --- a/great_expectations/checkpoint/checkpoint.py +++ b/great_expectations/checkpoint/checkpoint.py @@ -34,7 +34,7 @@ ) from great_expectations.compatibility.typing_extensions import override from great_expectations.core.expectation_validation_result import ( - ExpectationSuiteValidationResult, # noqa: TCH001 + ExpectationSuiteValidationResult, ) from great_expectations.core.freshness_diagnostics import CheckpointFreshnessDiagnostics from great_expectations.core.result_format import DEFAULT_RESULT_FORMAT, ResultFormatUnion diff --git a/great_expectations/expectations/core/schemas/ExpectColumnDistinctValuesToBeInSet.json b/great_expectations/expectations/core/schemas/ExpectColumnDistinctValuesToBeInSet.json index 061f346d1399..c0f63b773bf5 100644 --- a/great_expectations/expectations/core/schemas/ExpectColumnDistinctValuesToBeInSet.json +++ b/great_expectations/expectations/core/schemas/ExpectColumnDistinctValuesToBeInSet.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -224,6 +232,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectColumnDistinctValuesToContainSet.json b/great_expectations/expectations/core/schemas/ExpectColumnDistinctValuesToContainSet.json index be3d04560a26..a662b5bc17f1 100644 --- a/great_expectations/expectations/core/schemas/ExpectColumnDistinctValuesToContainSet.json +++ b/great_expectations/expectations/core/schemas/ExpectColumnDistinctValuesToContainSet.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -224,6 +232,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectColumnDistinctValuesToEqualSet.json b/great_expectations/expectations/core/schemas/ExpectColumnDistinctValuesToEqualSet.json index 3cf398abea77..bf0f64d1c1ba 100644 --- a/great_expectations/expectations/core/schemas/ExpectColumnDistinctValuesToEqualSet.json +++ b/great_expectations/expectations/core/schemas/ExpectColumnDistinctValuesToEqualSet.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -224,6 +232,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectColumnKLDivergenceToBeLessThan.json b/great_expectations/expectations/core/schemas/ExpectColumnKLDivergenceToBeLessThan.json index 3a1cee79f84d..da68203f1974 100644 --- a/great_expectations/expectations/core/schemas/ExpectColumnKLDivergenceToBeLessThan.json +++ b/great_expectations/expectations/core/schemas/ExpectColumnKLDivergenceToBeLessThan.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -218,6 +226,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectColumnMaxToBeBetween.json b/great_expectations/expectations/core/schemas/ExpectColumnMaxToBeBetween.json index 1de7dfdffd2f..94ed24b15d4c 100644 --- a/great_expectations/expectations/core/schemas/ExpectColumnMaxToBeBetween.json +++ b/great_expectations/expectations/core/schemas/ExpectColumnMaxToBeBetween.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -197,6 +205,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectColumnMeanToBeBetween.json b/great_expectations/expectations/core/schemas/ExpectColumnMeanToBeBetween.json index 833bff73f15c..4953393daaeb 100644 --- a/great_expectations/expectations/core/schemas/ExpectColumnMeanToBeBetween.json +++ b/great_expectations/expectations/core/schemas/ExpectColumnMeanToBeBetween.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -197,6 +205,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectColumnMedianToBeBetween.json b/great_expectations/expectations/core/schemas/ExpectColumnMedianToBeBetween.json index 321f7403a07d..174a8eb6c618 100644 --- a/great_expectations/expectations/core/schemas/ExpectColumnMedianToBeBetween.json +++ b/great_expectations/expectations/core/schemas/ExpectColumnMedianToBeBetween.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -197,6 +205,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectColumnMinToBeBetween.json b/great_expectations/expectations/core/schemas/ExpectColumnMinToBeBetween.json index 73942f642f0e..53271cd2b344 100644 --- a/great_expectations/expectations/core/schemas/ExpectColumnMinToBeBetween.json +++ b/great_expectations/expectations/core/schemas/ExpectColumnMinToBeBetween.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -197,6 +205,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectColumnMostCommonValueToBeInSet.json b/great_expectations/expectations/core/schemas/ExpectColumnMostCommonValueToBeInSet.json index fdb79d6a16e0..445273cf1a11 100644 --- a/great_expectations/expectations/core/schemas/ExpectColumnMostCommonValueToBeInSet.json +++ b/great_expectations/expectations/core/schemas/ExpectColumnMostCommonValueToBeInSet.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -229,6 +237,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectColumnPairValuesAToBeGreaterThanB.json b/great_expectations/expectations/core/schemas/ExpectColumnPairValuesAToBeGreaterThanB.json index 8b7c80de70e4..9611f4fe0da1 100644 --- a/great_expectations/expectations/core/schemas/ExpectColumnPairValuesAToBeGreaterThanB.json +++ b/great_expectations/expectations/core/schemas/ExpectColumnPairValuesAToBeGreaterThanB.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -184,6 +192,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectColumnPairValuesToBeEqual.json b/great_expectations/expectations/core/schemas/ExpectColumnPairValuesToBeEqual.json index 8032d0c3c140..55e5a8e6bc15 100644 --- a/great_expectations/expectations/core/schemas/ExpectColumnPairValuesToBeEqual.json +++ b/great_expectations/expectations/core/schemas/ExpectColumnPairValuesToBeEqual.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -180,6 +188,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectColumnPairValuesToBeInSet.json b/great_expectations/expectations/core/schemas/ExpectColumnPairValuesToBeInSet.json index 547a568f16f1..cb637e6e4453 100644 --- a/great_expectations/expectations/core/schemas/ExpectColumnPairValuesToBeInSet.json +++ b/great_expectations/expectations/core/schemas/ExpectColumnPairValuesToBeInSet.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -193,6 +201,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectColumnProportionOfUniqueValuesToBeBetween.json b/great_expectations/expectations/core/schemas/ExpectColumnProportionOfUniqueValuesToBeBetween.json index 1f64280cad5c..682d40c81d61 100644 --- a/great_expectations/expectations/core/schemas/ExpectColumnProportionOfUniqueValuesToBeBetween.json +++ b/great_expectations/expectations/core/schemas/ExpectColumnProportionOfUniqueValuesToBeBetween.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -214,6 +222,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectColumnQuantileValuesToBeBetween.json b/great_expectations/expectations/core/schemas/ExpectColumnQuantileValuesToBeBetween.json index b76e4a9f2a79..5cb42d1b8a4e 100644 --- a/great_expectations/expectations/core/schemas/ExpectColumnQuantileValuesToBeBetween.json +++ b/great_expectations/expectations/core/schemas/ExpectColumnQuantileValuesToBeBetween.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -175,6 +183,55 @@ ], "type": "string" }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false + }, "QuantileRange": { "title": "QuantileRange", "type": "object", diff --git a/great_expectations/expectations/core/schemas/ExpectColumnStdevToBeBetween.json b/great_expectations/expectations/core/schemas/ExpectColumnStdevToBeBetween.json index c564c7fac598..fb421dd9e084 100644 --- a/great_expectations/expectations/core/schemas/ExpectColumnStdevToBeBetween.json +++ b/great_expectations/expectations/core/schemas/ExpectColumnStdevToBeBetween.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -197,6 +205,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectColumnSumToBeBetween.json b/great_expectations/expectations/core/schemas/ExpectColumnSumToBeBetween.json index a9b516cc0eac..12069e6468bc 100644 --- a/great_expectations/expectations/core/schemas/ExpectColumnSumToBeBetween.json +++ b/great_expectations/expectations/core/schemas/ExpectColumnSumToBeBetween.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -196,6 +204,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectColumnToExist.json b/great_expectations/expectations/core/schemas/ExpectColumnToExist.json index 366c8cde63b5..5dd5ce41c8a7 100644 --- a/great_expectations/expectations/core/schemas/ExpectColumnToExist.json +++ b/great_expectations/expectations/core/schemas/ExpectColumnToExist.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -165,6 +173,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectColumnUniqueValueCountToBeBetween.json b/great_expectations/expectations/core/schemas/ExpectColumnUniqueValueCountToBeBetween.json index ce6e3308a0c6..df297f58f5c3 100644 --- a/great_expectations/expectations/core/schemas/ExpectColumnUniqueValueCountToBeBetween.json +++ b/great_expectations/expectations/core/schemas/ExpectColumnUniqueValueCountToBeBetween.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -214,6 +222,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectColumnValueLengthsToBeBetween.json b/great_expectations/expectations/core/schemas/ExpectColumnValueLengthsToBeBetween.json index 02d18f01c451..a3d20224ed55 100644 --- a/great_expectations/expectations/core/schemas/ExpectColumnValueLengthsToBeBetween.json +++ b/great_expectations/expectations/core/schemas/ExpectColumnValueLengthsToBeBetween.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -206,6 +214,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectColumnValueLengthsToEqual.json b/great_expectations/expectations/core/schemas/ExpectColumnValueLengthsToEqual.json index a0f07bcc7a74..9827c7b643da 100644 --- a/great_expectations/expectations/core/schemas/ExpectColumnValueLengthsToEqual.json +++ b/great_expectations/expectations/core/schemas/ExpectColumnValueLengthsToEqual.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -175,6 +183,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectColumnValueZScoresToBeLessThan.json b/great_expectations/expectations/core/schemas/ExpectColumnValueZScoresToBeLessThan.json index c1dc3f24b771..fe7a5349bca7 100644 --- a/great_expectations/expectations/core/schemas/ExpectColumnValueZScoresToBeLessThan.json +++ b/great_expectations/expectations/core/schemas/ExpectColumnValueZScoresToBeLessThan.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -189,6 +197,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectColumnValuesToBeBetween.json b/great_expectations/expectations/core/schemas/ExpectColumnValuesToBeBetween.json index c7ec42c65dba..fa16686e79e4 100644 --- a/great_expectations/expectations/core/schemas/ExpectColumnValuesToBeBetween.json +++ b/great_expectations/expectations/core/schemas/ExpectColumnValuesToBeBetween.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -205,6 +213,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectColumnValuesToBeInSet.json b/great_expectations/expectations/core/schemas/ExpectColumnValuesToBeInSet.json index a2e63c8535e8..eff2eba43789 100644 --- a/great_expectations/expectations/core/schemas/ExpectColumnValuesToBeInSet.json +++ b/great_expectations/expectations/core/schemas/ExpectColumnValuesToBeInSet.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -233,6 +241,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectColumnValuesToBeInTypeList.json b/great_expectations/expectations/core/schemas/ExpectColumnValuesToBeInTypeList.json index 158e0d030b98..a4945ff93685 100644 --- a/great_expectations/expectations/core/schemas/ExpectColumnValuesToBeInTypeList.json +++ b/great_expectations/expectations/core/schemas/ExpectColumnValuesToBeInTypeList.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -178,6 +186,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectColumnValuesToBeNull.json b/great_expectations/expectations/core/schemas/ExpectColumnValuesToBeNull.json index e92b768a6adb..64eda3d7025b 100644 --- a/great_expectations/expectations/core/schemas/ExpectColumnValuesToBeNull.json +++ b/great_expectations/expectations/core/schemas/ExpectColumnValuesToBeNull.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -163,6 +171,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectColumnValuesToBeOfType.json b/great_expectations/expectations/core/schemas/ExpectColumnValuesToBeOfType.json index b9b10d85c1c7..90ff57034425 100644 --- a/great_expectations/expectations/core/schemas/ExpectColumnValuesToBeOfType.json +++ b/great_expectations/expectations/core/schemas/ExpectColumnValuesToBeOfType.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -168,6 +176,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectColumnValuesToBeUnique.json b/great_expectations/expectations/core/schemas/ExpectColumnValuesToBeUnique.json index 1daf51621140..da322b1858b8 100644 --- a/great_expectations/expectations/core/schemas/ExpectColumnValuesToBeUnique.json +++ b/great_expectations/expectations/core/schemas/ExpectColumnValuesToBeUnique.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -161,6 +169,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectColumnValuesToMatchLikePattern.json b/great_expectations/expectations/core/schemas/ExpectColumnValuesToMatchLikePattern.json index 0844b1c7e830..80f6b37a4335 100644 --- a/great_expectations/expectations/core/schemas/ExpectColumnValuesToMatchLikePattern.json +++ b/great_expectations/expectations/core/schemas/ExpectColumnValuesToMatchLikePattern.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -171,6 +179,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectColumnValuesToMatchLikePatternList.json b/great_expectations/expectations/core/schemas/ExpectColumnValuesToMatchLikePatternList.json index bf31918072fd..b7648f87898c 100644 --- a/great_expectations/expectations/core/schemas/ExpectColumnValuesToMatchLikePatternList.json +++ b/great_expectations/expectations/core/schemas/ExpectColumnValuesToMatchLikePatternList.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -184,6 +192,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectColumnValuesToMatchRegex.json b/great_expectations/expectations/core/schemas/ExpectColumnValuesToMatchRegex.json index bf7852cbea4c..9acc23c0d27f 100644 --- a/great_expectations/expectations/core/schemas/ExpectColumnValuesToMatchRegex.json +++ b/great_expectations/expectations/core/schemas/ExpectColumnValuesToMatchRegex.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -171,6 +179,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectColumnValuesToMatchRegexList.json b/great_expectations/expectations/core/schemas/ExpectColumnValuesToMatchRegexList.json index 3526039fa053..379b0f7e0c04 100644 --- a/great_expectations/expectations/core/schemas/ExpectColumnValuesToMatchRegexList.json +++ b/great_expectations/expectations/core/schemas/ExpectColumnValuesToMatchRegexList.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -184,6 +192,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectColumnValuesToNotBeInSet.json b/great_expectations/expectations/core/schemas/ExpectColumnValuesToNotBeInSet.json index df26815db87d..bb0f4e882c7e 100644 --- a/great_expectations/expectations/core/schemas/ExpectColumnValuesToNotBeInSet.json +++ b/great_expectations/expectations/core/schemas/ExpectColumnValuesToNotBeInSet.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -233,6 +241,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectColumnValuesToNotBeNull.json b/great_expectations/expectations/core/schemas/ExpectColumnValuesToNotBeNull.json index 5fcaff3c0f58..0a3c5076230b 100644 --- a/great_expectations/expectations/core/schemas/ExpectColumnValuesToNotBeNull.json +++ b/great_expectations/expectations/core/schemas/ExpectColumnValuesToNotBeNull.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -162,6 +170,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectColumnValuesToNotMatchLikePattern.json b/great_expectations/expectations/core/schemas/ExpectColumnValuesToNotMatchLikePattern.json index c325b80c0f0e..bdde9eae49b0 100644 --- a/great_expectations/expectations/core/schemas/ExpectColumnValuesToNotMatchLikePattern.json +++ b/great_expectations/expectations/core/schemas/ExpectColumnValuesToNotMatchLikePattern.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -171,6 +179,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectColumnValuesToNotMatchLikePatternList.json b/great_expectations/expectations/core/schemas/ExpectColumnValuesToNotMatchLikePatternList.json index 46a18a2e0c02..b39b3826b8c3 100644 --- a/great_expectations/expectations/core/schemas/ExpectColumnValuesToNotMatchLikePatternList.json +++ b/great_expectations/expectations/core/schemas/ExpectColumnValuesToNotMatchLikePatternList.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -174,6 +182,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectColumnValuesToNotMatchRegex.json b/great_expectations/expectations/core/schemas/ExpectColumnValuesToNotMatchRegex.json index 06e6cc16288a..ecce98707796 100644 --- a/great_expectations/expectations/core/schemas/ExpectColumnValuesToNotMatchRegex.json +++ b/great_expectations/expectations/core/schemas/ExpectColumnValuesToNotMatchRegex.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -171,6 +179,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectColumnValuesToNotMatchRegexList.json b/great_expectations/expectations/core/schemas/ExpectColumnValuesToNotMatchRegexList.json index f461cda37bd0..ac839b4d1c24 100644 --- a/great_expectations/expectations/core/schemas/ExpectColumnValuesToNotMatchRegexList.json +++ b/great_expectations/expectations/core/schemas/ExpectColumnValuesToNotMatchRegexList.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -174,6 +182,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectCompoundColumnsToBeUnique.json b/great_expectations/expectations/core/schemas/ExpectCompoundColumnsToBeUnique.json index 5313f07dfee9..a095dd3f0b6b 100644 --- a/great_expectations/expectations/core/schemas/ExpectCompoundColumnsToBeUnique.json +++ b/great_expectations/expectations/core/schemas/ExpectCompoundColumnsToBeUnique.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -174,6 +182,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectMulticolumnSumToEqual.json b/great_expectations/expectations/core/schemas/ExpectMulticolumnSumToEqual.json index 72480e47d144..9d39dfccb86a 100644 --- a/great_expectations/expectations/core/schemas/ExpectMulticolumnSumToEqual.json +++ b/great_expectations/expectations/core/schemas/ExpectMulticolumnSumToEqual.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -181,6 +189,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectSelectColumnValuesToBeUniqueWithinRecord.json b/great_expectations/expectations/core/schemas/ExpectSelectColumnValuesToBeUniqueWithinRecord.json index fd8748a9bf57..9ecabdee7ed2 100644 --- a/great_expectations/expectations/core/schemas/ExpectSelectColumnValuesToBeUniqueWithinRecord.json +++ b/great_expectations/expectations/core/schemas/ExpectSelectColumnValuesToBeUniqueWithinRecord.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -170,6 +178,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectTableColumnCountToBeBetween.json b/great_expectations/expectations/core/schemas/ExpectTableColumnCountToBeBetween.json index abeaffe7bcc4..6fbd28ac7e29 100644 --- a/great_expectations/expectations/core/schemas/ExpectTableColumnCountToBeBetween.json +++ b/great_expectations/expectations/core/schemas/ExpectTableColumnCountToBeBetween.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -176,6 +184,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectTableColumnCountToEqual.json b/great_expectations/expectations/core/schemas/ExpectTableColumnCountToEqual.json index 367cf5b2891c..70294137d0af 100644 --- a/great_expectations/expectations/core/schemas/ExpectTableColumnCountToEqual.json +++ b/great_expectations/expectations/core/schemas/ExpectTableColumnCountToEqual.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -159,6 +167,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectTableColumnsToMatchOrderedList.json b/great_expectations/expectations/core/schemas/ExpectTableColumnsToMatchOrderedList.json index 6d4899d5384b..6f027f804003 100644 --- a/great_expectations/expectations/core/schemas/ExpectTableColumnsToMatchOrderedList.json +++ b/great_expectations/expectations/core/schemas/ExpectTableColumnsToMatchOrderedList.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -162,6 +170,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectTableColumnsToMatchSet.json b/great_expectations/expectations/core/schemas/ExpectTableColumnsToMatchSet.json index 09febc0ec629..6c603c24540d 100644 --- a/great_expectations/expectations/core/schemas/ExpectTableColumnsToMatchSet.json +++ b/great_expectations/expectations/core/schemas/ExpectTableColumnsToMatchSet.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -167,6 +175,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectTableRowCountToBeBetween.json b/great_expectations/expectations/core/schemas/ExpectTableRowCountToBeBetween.json index c87d46fcd907..d21c52e4d9e6 100644 --- a/great_expectations/expectations/core/schemas/ExpectTableRowCountToBeBetween.json +++ b/great_expectations/expectations/core/schemas/ExpectTableRowCountToBeBetween.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -176,6 +184,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectTableRowCountToEqual.json b/great_expectations/expectations/core/schemas/ExpectTableRowCountToEqual.json index c487fa2741c9..49b712d868b6 100644 --- a/great_expectations/expectations/core/schemas/ExpectTableRowCountToEqual.json +++ b/great_expectations/expectations/core/schemas/ExpectTableRowCountToEqual.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -159,6 +167,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/ExpectTableRowCountToEqualOtherTable.json b/great_expectations/expectations/core/schemas/ExpectTableRowCountToEqualOtherTable.json index a21c2e438310..10da0fea8544 100644 --- a/great_expectations/expectations/core/schemas/ExpectTableRowCountToEqualOtherTable.json +++ b/great_expectations/expectations/core/schemas/ExpectTableRowCountToEqualOtherTable.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -149,6 +157,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/core/schemas/UnexpectedRowsExpectation.json b/great_expectations/expectations/core/schemas/UnexpectedRowsExpectation.json index 99b7a4be1503..80f82e45d0b5 100644 --- a/great_expectations/expectations/core/schemas/UnexpectedRowsExpectation.json +++ b/great_expectations/expectations/core/schemas/UnexpectedRowsExpectation.json @@ -54,6 +54,14 @@ "type": "object" } }, + "windows": { + "title": "Windows", + "description": "Definition(s) for evaluation of temporal windows", + "type": "array", + "items": { + "$ref": "#/definitions/Window" + } + }, "batch_id": { "title": "Batch Id", "type": "string" @@ -127,6 +135,55 @@ "SUMMARY" ], "type": "string" + }, + "Offset": { + "title": "Offset", + "description": "A threshold in which a metric will be considered passable", + "type": "object", + "properties": { + "positive": { + "title": "Positive", + "type": "number" + }, + "negative": { + "title": "Negative", + "type": "number" + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + }, + "Window": { + "title": "Window", + "description": "A definition for a temporal window across <`range`> number of previous invocations", + "type": "object", + "properties": { + "constraint_fn": { + "title": "Constraint Fn", + "type": "string" + }, + "parameter_name": { + "title": "Parameter Name", + "type": "string" + }, + "range": { + "title": "Range", + "type": "integer" + }, + "offset": { + "$ref": "#/definitions/Offset" + } + }, + "required": [ + "constraint_fn", + "parameter_name", + "range", + "offset" + ], + "additionalProperties": false } } } diff --git a/great_expectations/expectations/expectation.py b/great_expectations/expectations/expectation.py index 32ee70d60159..510c17de40dc 100644 --- a/great_expectations/expectations/expectation.py +++ b/great_expectations/expectations/expectation.py @@ -63,8 +63,9 @@ COLUMN_DESCRIPTION, COLUMN_LIST_DESCRIPTION, MOSTLY_DESCRIPTION, + WINDOWS_DESCRIPTION, ) -from great_expectations.expectations.model_field_types import ( # noqa: TCH001 # types needed for pydantic deser +from great_expectations.expectations.model_field_types import ( Mostly, ) from great_expectations.expectations.registry import ( @@ -75,6 +76,7 @@ from great_expectations.expectations.sql_tokens_and_types import ( valid_sql_tokens_and_types, ) +from great_expectations.expectations.window import Window from great_expectations.render import ( AtomicDiagnosticRendererType, AtomicPrescriptiveRendererType, @@ -330,6 +332,7 @@ def schema_extra(schema: Dict[str, Any], model: Type[Expectation]) -> None: args_keys: ClassVar[Tuple[str, ...]] = () expectation_type: ClassVar[str] + windows: Optional[List[Window]] = pydantic.Field(default=None, description=WINDOWS_DESCRIPTION) examples: ClassVar[List[dict]] = [] _save_callback: Union[Callable[[Expectation], Expectation], None] = pydantic.PrivateAttr( diff --git a/great_expectations/expectations/model_field_descriptions.py b/great_expectations/expectations/model_field_descriptions.py index 47d8b2d68ed1..d151ba0e94b9 100644 --- a/great_expectations/expectations/model_field_descriptions.py +++ b/great_expectations/expectations/model_field_descriptions.py @@ -7,3 +7,4 @@ "If specified, sets the condition on which a given row is to be ignored." ) VALUE_SET_DESCRIPTION = "A set of objects used for comparison." +WINDOWS_DESCRIPTION = "Definition(s) for evaluation of temporal windows" diff --git a/great_expectations/expectations/window.py b/great_expectations/expectations/window.py new file mode 100644 index 000000000000..eab95ba9d488 --- /dev/null +++ b/great_expectations/expectations/window.py @@ -0,0 +1,28 @@ +from great_expectations.compatibility import pydantic +from great_expectations.compatibility.pydantic import Extra + + +class Offset(pydantic.BaseModel): + """ + A threshold in which a metric will be considered passable + """ + + positive: float + negative: float + + class Config: + extra = Extra.forbid + + +class Window(pydantic.BaseModel): + """ + A definition for a temporal window across <`range`> number of previous invocations + """ + + constraint_fn: str + parameter_name: str + range: int + offset: Offset + + class Config: + extra = Extra.forbid diff --git a/pyproject.toml b/pyproject.toml index ddaee570575b..6067d0b140a3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -398,6 +398,7 @@ runtime-evaluated-base-classes = [ "great_expectations.datasource.fluent.fluent_base_model.FluentBaseModel", "great_expectations.datasource.fluent.interfaces.Datasource", "great_expectations.datasource.fluent.sql_datasource.SQLDatasource", + "great_expectations.compatibility.pydantic.BaseModel", ] runtime-evaluated-decorators = ["pydantic.dataclasses.dataclass"] diff --git a/tests/expectations/core/test_core_model_schemas.py b/tests/expectations/core/test_core_model_schemas.py index 73ab893bc262..1db62124f042 100644 --- a/tests/expectations/core/test_core_model_schemas.py +++ b/tests/expectations/core/test_core_model_schemas.py @@ -22,7 +22,7 @@ def test_all_core_model_schemas_are_serializable(): model.schema_json() -@pytest.mark.unit +@pytest.mark.filesystem # ~4s def test_schemas_updated(): all_models = { cls_name: expectation diff --git a/tests/expectations/core/test_expectation_serialization.py b/tests/expectations/core/test_expectation_serialization.py index f07833510f61..e6f91c3d294e 100644 --- a/tests/expectations/core/test_expectation_serialization.py +++ b/tests/expectations/core/test_expectation_serialization.py @@ -5,6 +5,7 @@ ExpectColumnValuesToNotBeNull, UnexpectedRowsExpectation, ) +from great_expectations.expectations.window import Offset, Window @pytest.mark.unit @@ -19,9 +20,9 @@ ( '{"id": null, "meta": null, "notes": null, "result_format": "BASIC", ' '"description": null, "catch_exceptions": false, "rendered_content": null, ' - '"batch_id": null, "row_condition": null, "condition_parser": null, "column": ' - '"test_column", "min_value": 1.0, "max_value": null, "strict_min": false, ' - '"strict_max": false}' + '"windows": null, "batch_id": null, "row_condition": null, "condition_parser": ' + 'null, "column": "test_column", "min_value": 1.0, "max_value": null, ' + '"strict_min": false, "strict_max": false}' ), ), ( @@ -32,8 +33,8 @@ ( '{"id": null, "meta": null, "notes": null, "result_format": "BASIC", ' '"description": null, "catch_exceptions": true, "rendered_content": null, ' - '"batch_id": null, "row_condition": null, "condition_parser": null, "column": ' - '"test_column", "mostly": 0.82}' + '"windows": null, "batch_id": null, "row_condition": null, "condition_parser": ' + 'null, "column": "test_column", "mostly": 0.82}' ), ), ( @@ -44,9 +45,31 @@ ( '{"id": null, "meta": null, "notes": null, "result_format": "BASIC", ' '"description": "Data shouldn\'t be bad.", "catch_exceptions": false, ' - '"rendered_content": null, "batch_id": null, "row_condition": null, ' - '"condition_parser": null, "unexpected_rows_query": "SELECT * FROM my_table ' - "WHERE data='bad'\"}" + '"rendered_content": null, "windows": null, "batch_id": null, "row_condition": ' + 'null, "condition_parser": null, "unexpected_rows_query": "SELECT * FROM ' + "my_table WHERE data='bad'\"}" + ), + ), + ( + ExpectColumnValuesToNotBeNull( + column="test_column", + mostly=0.82, + windows=[ + Window( + constraint_fn="a", + parameter_name="b", + range=5, + offset=Offset(positive=0.2, negative=0.2), + ) + ], + ), + ( + '{"id": null, "meta": null, "notes": null, "result_format": "BASIC", ' + '"description": null, "catch_exceptions": true, "rendered_content": null, ' + '"windows": [{"constraint_fn": "a", "parameter_name": "b", "range": 5, ' + '"offset": {"positive": 0.2, "negative": 0.2}}], "batch_id": null, ' + '"row_condition": null, "condition_parser": null, "column": "test_column", ' + '"mostly": 0.82}' ), ), ], diff --git a/tests/expectations/test_expectation.py b/tests/expectations/test_expectation.py index 22404d1e111f..b32b23e80b5c 100644 --- a/tests/expectations/test_expectation.py +++ b/tests/expectations/test_expectation.py @@ -18,6 +18,7 @@ from great_expectations.expectations.expectation_configuration import ( ExpectationConfiguration, ) +from great_expectations.expectations.window import Offset, Window from great_expectations.validator.metric_configuration import MetricConfiguration LOGGER = logging.getLogger(__name__) @@ -225,6 +226,59 @@ def test_expectation_configuration_property(): ) +@pytest.mark.unit +def test_expectation_configuration_window(): + expectation = gxe.ExpectColumnMaxToBeBetween( + column="foo", + min_value=0, + max_value=10, + windows=[ + Window( + constraint_fn="a", + parameter_name="b", + range=5, + offset=Offset(positive=0.2, negative=0.2), + ) + ], + ) + + assert expectation.configuration == ExpectationConfiguration( + type="expect_column_max_to_be_between", + kwargs={ + "column": "foo", + "min_value": 0, + "max_value": 10, + "windows": [ + { + "constraint_fn": "a", + "parameter_name": "b", + "range": 5, + "offset": {"positive": 0.2, "negative": 0.2}, + } + ], + }, + ) + + +@pytest.mark.unit +def test_expectation_configuration_window_empty(): + expectation = gxe.ExpectColumnMaxToBeBetween( + column="foo", + min_value=0, + max_value=10, + windows=None, + ) + + assert expectation.configuration == ExpectationConfiguration( + type="expect_column_max_to_be_between", + kwargs={ + "column": "foo", + "min_value": 0, + "max_value": 10, + }, + ) + + @pytest.mark.unit def test_expectation_configuration_property_recognizes_state_changes(): expectation = gxe.ExpectColumnMaxToBeBetween(column="foo", min_value=0, max_value=10) diff --git a/tests/integration/cloud/rest_contracts/conftest.py b/tests/integration/cloud/rest_contracts/conftest.py index 9fdb1aac0602..08cc172ef8ea 100644 --- a/tests/integration/cloud/rest_contracts/conftest.py +++ b/tests/integration/cloud/rest_contracts/conftest.py @@ -9,7 +9,7 @@ import pact import pytest -from typing_extensions import Annotated, TypeAlias # noqa: TCH002 +from typing_extensions import Annotated, TypeAlias from great_expectations.compatibility import pydantic from great_expectations.core.http import create_session