{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aws-glue/json-schema/aws-glue-publish-data-quality-result-v2-request-schema.json",
  "title": "PublishDataQualityResultV2Request",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aws-glue-aws-glue-api-api-openapi.yml#/components/schemas/PublishDataQualityResultV2Request",
  "type": "object",
  "properties": {
    "Dimensions": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "The dimensions for the result."
    },
    "Tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "The tags for the result."
    },
    "ExecutionStartedOn": {
      "type": "string",
      "format": "date-time",
      "description": "The time execution started for the result."
    },
    "ExecutionCompletedOn": {
      "type": "string",
      "format": "date-time",
      "description": "The time execution completed for the result."
    },
    "Score": {
      "type": "number",
      "description": "The score for the result."
    },
    "RuleResults": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DataQualityRuleResult"
      },
      "description": "The rule level results."
    },
    "AnalyzerResults": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DataQualityAnalyzerResult"
      },
      "description": "The analyzer level results."
    },
    "Observations": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DataQualityObservation"
      },
      "description": "The observations for the result."
    },
    "AggregatedMetrics": {
      "$ref": "#/$defs/DataQualityAggregatedMetrics"
    },
    "Statistics": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/StatisticSummary"
      },
      "description": "The statistics for the result."
    },
    "RunConfiguration": {
      "$ref": "#/$defs/DataQualityConfigurationV2"
    },
    "ClientToken": {
      "type": "string",
      "description": "The client token for the request."
    },
    "EvaluationContext": {
      "type": "string",
      "description": "The evaluation context for the result."
    },
    "Descriptors": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "The descriptors for the result."
    },
    "RulesetName": {
      "type": "string",
      "description": "The ruleset name for the result."
    },
    "DataQualitySecurityConfiguration": {
      "type": "string",
      "description": "The security configuration for the result."
    },
    "Telemetry": {
      "$ref": "#/$defs/DataQualityTelemetry"
    }
  },
  "required": [
    "Dimensions",
    "Score",
    "RuleResults",
    "EvaluationContext"
  ],
  "$defs": {
    "DataQualityAggregatedMetrics": {
      "type": "object",
      "properties": {
        "TotalRowsProcessed": {
          "type": "number",
          "description": "The total number of rows that were processed during the data quality evaluation."
        },
        "TotalRowsPassed": {
          "type": "number",
          "description": "The total number of rows that passed all applicable data quality rules."
        },
        "TotalRowsFailed": {
          "type": "number",
          "description": "The total number of rows that failed one or more data quality rules."
        },
        "TotalRulesProcessed": {
          "type": "number",
          "description": "The total number of data quality rules that were evaluated."
        },
        "TotalRulesPassed": {
          "type": "number",
          "description": "The total number of data quality rules that passed their evaluation criteria."
        },
        "TotalRulesFailed": {
          "type": "number",
          "description": "The total number of data quality rules that failed their evaluation criteria."
        }
      }
    },
    "DataQualityAnalyzerResult": {
      "type": "object",
      "properties": {
        "Name": {
          "type": "string",
          "description": "The name of the data quality analyzer."
        },
        "Description": {
          "type": "string",
          "description": "A description of the data quality analyzer."
        },
        "EvaluationMessage": {
          "type": "string",
          "description": "An evaluation message."
        },
        "EvaluatedMetrics": {
          "type": "object",
          "additionalProperties": {
            "type": "number"
          },
          "description": "A map of metrics associated with the evaluation of the analyzer."
        },
        "EvaluatedDistributions": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/DistributionData"
          },
          "description": "A map of distribution metrics associated with the evaluation of the analyzer."
        }
      }
    },
    "DataQualityConfigurationV2": {
      "type": "object",
      "properties": {
        "ObservationsEnabled": {
          "type": "string",
          "enum": [
            "ALL",
            "NONE"
          ],
          "description": "Whether observations are enabled for the run. Valid values are: ALL NONE"
        },
        "ObservationMode": {
          "type": "string",
          "enum": [
            "SCHEDULED",
            "FIXED"
          ],
          "description": "The observation mode for the run. Valid values are: SCHEDULED FIXED"
        }
      }
    },
    "DataQualityMetricValues": {
      "type": "object",
      "properties": {
        "ActualValue": {
          "type": "number",
          "description": "The actual value of the data quality metric."
        },
        "ExpectedValue": {
          "type": "number",
          "description": "The expected value of the data quality metric according to the analysis of historical data."
        },
        "LowerLimit": {
          "type": "number",
          "description": "The lower limit of the data quality metric value according to the analysis of historical data."
        },
        "UpperLimit": {
          "type": "number",
          "description": "The upper limit of the data quality metric value according to the analysis of historical data."
        }
      }
    },
    "DataQualityObservation": {
      "type": "object",
      "properties": {
        "Description": {
          "type": "string",
          "description": "A description of the data quality observation."
        },
        "MetricBasedObservation": {
          "$ref": "#/$defs/MetricBasedObservation"
        }
      }
    },
    "DataQualityRuleResult": {
      "type": "object",
      "properties": {
        "Name": {
          "type": "string",
          "description": "The name of the data quality rule."
        },
        "Description": {
          "type": "string",
          "description": "A description of the data quality rule."
        },
        "EvaluationMessage": {
          "type": "string",
          "description": "An evaluation message."
        },
        "Result": {
          "type": "string",
          "enum": [
            "PASS",
            "FAIL",
            "ERROR"
          ],
          "description": "A pass or fail status for the rule."
        },
        "EvaluatedMetrics": {
          "type": "object",
          "additionalProperties": {
            "type": "number"
          },
          "description": "A map of metrics associated with the evaluation of the rule."
        },
        "EvaluatedRule": {
          "type": "string",
          "description": "The evaluated rule."
        },
        "RuleMetrics": {
          "type": "object",
          "additionalProperties": {
            "type": "number"
          },
          "description": "A map containing metrics associated with the evaluation of the rule based on row-level results."
        },
        "Labels": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "A map containing labels assigned to the data quality rule."
        }
      }
    },
    "DataQualityTelemetry": {
      "type": "object",
      "properties": {
        "VcpuHours": {
          "type": "number"
        },
        "FlagsEnabled": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "LibraryVersion": {
          "type": "string"
        },
        "SparkVersion": {
          "type": "string"
        },
        "HostRuntimeVersion": {
          "type": "string"
        },
        "Engine": {
          "type": "string",
          "enum": [
            "SPARK",
            "PYTHON"
          ]
        }
      }
    },
    "DistributionData": {
      "type": "object",
      "properties": {
        "BinEdges": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The bin edge values for the distribution."
        },
        "Count": {
          "type": "array",
          "items": {
            "type": "integer"
          },
          "description": "The frequency count for each bin in the distribution."
        },
        "DataType": {
          "type": "string",
          "description": "The data type of the column for the distribution."
        }
      }
    },
    "MetricBasedObservation": {
      "type": "object",
      "properties": {
        "MetricName": {
          "type": "string",
          "description": "The name of the data quality metric used for generating the observation."
        },
        "StatisticId": {
          "type": "string",
          "description": "The Statistic ID."
        },
        "MetricValues": {
          "$ref": "#/$defs/DataQualityMetricValues"
        },
        "NewRules": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of new data quality rules generated as part of the observation based on the data quality metric value."
        }
      }
    },
    "RunIdentifier": {
      "type": "object",
      "properties": {
        "RunId": {
          "type": "string",
          "description": "The Run ID."
        },
        "JobRunId": {
          "type": "string",
          "description": "The Job Run ID."
        }
      }
    },
    "StatisticSummary": {
      "type": "object",
      "properties": {
        "StatisticId": {
          "type": "string",
          "description": "The Statistic ID."
        },
        "ProfileId": {
          "type": "string",
          "description": "The Profile ID."
        },
        "RunIdentifier": {
          "$ref": "#/$defs/RunIdentifier"
        },
        "StatisticName": {
          "type": "string",
          "description": "The name of the statistic."
        },
        "DoubleValue": {
          "type": "number",
          "description": "The value of the statistic."
        },
        "DistributionValue": {
          "$ref": "#/$defs/DistributionData"
        },
        "EvaluationLevel": {
          "type": "string",
          "enum": [
            "Dataset",
            "Column",
            "Multicolumn"
          ],
          "description": "The evaluation level of the statistic. Possible values: Dataset, Column, Multicolumn."
        },
        "ColumnsReferenced": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The list of columns referenced by the statistic."
        },
        "ReferencedDatasets": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The list of datasets referenced by the statistic."
        },
        "StatisticProperties": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "A StatisticPropertiesMap, which contains a NameString and DescriptionString"
        },
        "RecordedOn": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp when the statistic was recorded."
        },
        "InclusionAnnotation": {
          "$ref": "#/$defs/TimestampedInclusionAnnotation"
        }
      }
    },
    "TimestampedInclusionAnnotation": {
      "type": "object",
      "properties": {
        "Value": {
          "type": "string",
          "enum": [
            "INCLUDE",
            "EXCLUDE"
          ],
          "description": "The inclusion annotation value."
        },
        "LastModifiedOn": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp when the inclusion annotation was last modified."
        }
      }
    }
  }
}