Skip to content

Commit

Permalink
[FEATURE] Add expectation windows for dynamic parameters (#10402)
Browse files Browse the repository at this point in the history
Co-authored-by: Robby Reinold <[email protected]>
Co-authored-by: Gabriel <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
4 people committed Sep 20, 2024
1 parent 70d7787 commit 396dfb8
Show file tree
Hide file tree
Showing 57 changed files with 2,858 additions and 12 deletions.
2 changes: 1 addition & 1 deletion great_expectations/checkpoint/checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
}
}
}
Loading

0 comments on commit 396dfb8

Please sign in to comment.