{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aws-glue/json-schema/aws-glue-get-data-quality-result-v2-response-schema.json",
  "title": "GetDataQualityResultV2Response",
  "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/GetDataQualityResultV2Response",
  "type": "object",
  "properties": {
    "ResultId": {
      "type": "string",
      "description": "A unique result ID for the data quality result."
    },
    "EvaluationRunMode": {
      "type": "string",
      "enum": [
        "ON_DEMAND",
        "EVALUATION_CONFIG"
      ],
      "description": "How the evaluation run that produced the result started: ON_DEMAND for a run started by StartDataQualityRulesetEvaluationRun, or EVALUATION_CONFIG for a run started by a data quality evaluation configuration. Not returned for results that no evaluation run produced, such as results from any ETL job."
    },
    "DataQualityEvaluationConfig": {
      "type": "string",
      "description": "The name of the data quality evaluation configuration that started the evaluation run, returned when EvaluationRunMode is EVALUATION_CONFIG."
    },
    "DataSource": {
      "$ref": "#/$defs/DataSource"
    },
    "ProfileId": {
      "type": "string",
      "description": "The Profile ID for the data quality result."
    },
    "Dimensions": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "A map of platform-specific identifiers, such as cluster, application, workgroup, or project IDs, that identify where the data quality evaluation ran."
    },
    "Tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "A map of tags associated with the data quality result."
    },
    "ExecutionStartedOn": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time when this data quality run started."
    },
    "ExecutionCompletedOn": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time when this data quality run completed."
    },
    "ResultPublishedOn": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time when this data quality result was published."
    },
    "Score": {
      "type": "number",
      "description": "An aggregate data quality score. Represents the ratio of rules that passed to the total number of rules."
    },
    "RuleResults": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DataQualityRuleResult"
      },
      "description": "A list of DataQualityRuleResult objects representing the results for each rule."
    },
    "AnalyzerResults": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DataQualityAnalyzerResult"
      },
      "description": "A list of DataQualityAnalyzerResult objects representing the results for each analyzer."
    },
    "Observations": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DataQualityObservation"
      },
      "description": "A list of DataQualityObservation objects representing the anomaly detection observations generated after evaluating the rules and analyzers."
    },
    "EvaluationContext": {
      "type": "string",
      "description": "The evaluation context for the data quality result. This value identifies a specific data quality result, or a series of related results, within a run."
    },
    "Descriptors": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "A map of user-provided descriptors that add contextual metadata and configuration to the data quality result, such as database name, table name, team, or environment."
    },
    "AggregatedMetrics": {
      "$ref": "#/$defs/DataQualityAggregatedMetrics"
    },
    "RulesetName": {
      "type": "string",
      "description": "The name of the ruleset associated with the data quality result."
    }
  },
  "$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."
        }
      }
    },
    "DataQualityGlueTable": {
      "type": "object",
      "properties": {
        "DatabaseName": {
          "type": "string",
          "description": "A database name in the Glue Data Catalog."
        },
        "TableName": {
          "type": "string",
          "description": "A table name in the Glue Data Catalog."
        },
        "CatalogId": {
          "type": "string",
          "description": "A unique identifier for the Glue Data Catalog."
        },
        "ConnectionName": {
          "type": "string",
          "description": "The name of the connection to the Glue Data Catalog."
        },
        "AdditionalOptions": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Additional options for the table. Currently there are two keys supported: pushDownPredicate: to filter on partitions without having to list and read all the files in your dataset. catalogPartitionPredicate: to use server-side partition pruning using partition indexes in the Glue Data Catalog."
        },
        "PreProcessingQuery": {
          "type": "string",
          "description": "SQL Query of SparkSQL format that can be used to pre-process the data for the table in Glue Data Catalog, before running the Data Quality Operation."
        }
      },
      "required": [
        "DatabaseName",
        "TableName"
      ]
    },
    "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."
        }
      }
    },
    "DataSource": {
      "type": "object",
      "properties": {
        "GlueTable": {
          "$ref": "#/$defs/GlueTable"
        },
        "DataQualityGlueTable": {
          "$ref": "#/$defs/DataQualityGlueTable"
        }
      }
    },
    "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."
        }
      }
    },
    "GlueTable": {
      "type": "object",
      "properties": {
        "DatabaseName": {
          "type": "string",
          "description": "A database name in the Glue Data Catalog."
        },
        "TableName": {
          "type": "string",
          "description": "A table name in the Glue Data Catalog."
        },
        "CatalogId": {
          "type": "string",
          "description": "A unique identifier for the Glue Data Catalog."
        },
        "ConnectionName": {
          "type": "string",
          "description": "The name of the connection to the Glue Data Catalog."
        },
        "AdditionalOptions": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Additional options for the table. Currently there are two keys supported: pushDownPredicate: to filter on partitions without having to list and read all the files in your dataset. catalogPartitionPredicate: to use server-side partition pruning using partition indexes in the Glue Data Catalog."
        }
      },
      "required": [
        "DatabaseName",
        "TableName"
      ]
    },
    "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."
        }
      }
    }
  }
}