{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-athena/json-schema/amazon-athena-get-calculation-execution-response-schema.json",
  "title": "GetCalculationExecutionResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-athena-calculation-execution-api-openapi.yml#/components/schemas/GetCalculationExecutionResponse",
  "type": "object",
  "properties": {
    "CalculationExecutionId": {
      "type": "string",
      "description": "The calculation execution UUID."
    },
    "SessionId": {
      "type": "string",
      "description": "The session ID that the calculation ran in."
    },
    "Description": {
      "type": "string",
      "description": "The description of the calculation execution."
    },
    "WorkingDirectory": {
      "type": "string",
      "description": "The Amazon S3 location in which calculation results are stored."
    },
    "Status": {
      "$ref": "#/$defs/CalculationStatus"
    },
    "Statistics": {
      "$ref": "#/$defs/CalculationStatistics"
    },
    "Result": {
      "$ref": "#/$defs/CalculationResult"
    }
  },
  "$defs": {
    "CalculationResult": {
      "type": "object",
      "properties": {
        "StdOutS3Uri": {
          "type": "string",
          "description": "The Amazon S3 location of the stdout file for the calculation."
        },
        "StdErrorS3Uri": {
          "type": "string",
          "description": "The Amazon S3 location of the stderr error messages file for the calculation."
        },
        "ResultS3Uri": {
          "type": "string",
          "description": "The Amazon S3 location of the folder for the calculation results."
        },
        "ResultType": {
          "type": "string",
          "description": "The data format of the calculation result."
        }
      }
    },
    "CalculationStatistics": {
      "type": "object",
      "properties": {
        "DpuExecutionInMillis": {
          "type": "integer",
          "description": "The data processing unit execution time in milliseconds for the calculation."
        },
        "Progress": {
          "type": "string",
          "description": "The progress of the calculation."
        }
      }
    },
    "CalculationStatus": {
      "type": "object",
      "properties": {
        "SubmissionDateTime": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time the calculation was submitted for processing."
        },
        "CompletionDateTime": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time the calculation completed processing."
        },
        "State": {
          "type": "string",
          "enum": [
            "CREATING",
            "CREATED",
            "QUEUED",
            "RUNNING",
            "CANCELING",
            "CANCELED",
            "COMPLETED",
            "FAILED"
          ],
          "description": "The state of the calculation execution. A description of each state follows. CREATING - The calculation is in the process of being created. CREATED - The calculation has been created and is ready to run. QUEUED - The calculation has been queued for processing. RUNNING - The calculation is running. CANCELING - A request to cancel the calculation has been received and the system is working to stop it. CANCELED - The calculation is no longer running as the result of a cancel request. COMPLETED - The calculation has completed without error. FAILED - The calculation failed and is no longer running."
        },
        "StateChangeReason": {
          "type": "string",
          "description": "The reason for the calculation state change (for example, the calculation was canceled because the session was terminated)."
        }
      }
    }
  }
}