{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-redshift/json-schema/amazon-redshift-get-statement-result-response-schema.json",
  "title": "GetStatementResultResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-redshift-result-retrieval-api-openapi.yml#/components/schemas/GetStatementResultResponse",
  "type": "object",
  "properties": {
    "Records": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "$ref": "#/$defs/Field"
        }
      },
      "description": "The results of the SQL statement in JSON format."
    },
    "ColumnMetadata": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ColumnMetadata"
      },
      "description": "The properties (metadata) of a column."
    },
    "TotalNumRows": {
      "type": "integer",
      "description": "The total number of rows in the result set returned from a query. You can use this number to estimate the number of calls to the GetStatementResult operation needed to page through the results."
    },
    "NextToken": {
      "type": "string",
      "description": "A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request."
    }
  },
  "required": [
    "Records"
  ],
  "$defs": {
    "ColumnMetadata": {
      "type": "object",
      "properties": {
        "isCaseSensitive": {
          "type": "boolean",
          "description": "A value that indicates whether the column is case-sensitive."
        },
        "isCurrency": {
          "type": "boolean",
          "description": "A value that indicates whether the column contains currency values."
        },
        "isSigned": {
          "type": "boolean",
          "description": "A value that indicates whether an integer column is signed."
        },
        "label": {
          "type": "string",
          "description": "The label for the column."
        },
        "name": {
          "type": "string",
          "description": "The name of the column."
        },
        "nullable": {
          "type": "integer",
          "description": "A value that indicates whether the column is nullable."
        },
        "precision": {
          "type": "integer",
          "description": "The precision value of a decimal number column, or the column length for a non-numeric column."
        },
        "scale": {
          "type": "integer",
          "description": "The scale value of a decimal number column."
        },
        "schemaName": {
          "type": "string",
          "description": "The name of the schema that contains the table that includes the column."
        },
        "tableName": {
          "type": "string",
          "description": "The name of the table that includes the column."
        },
        "typeName": {
          "type": "string",
          "description": "The database-specific data type of the column."
        },
        "length": {
          "type": "integer",
          "description": "The length of the column."
        },
        "columnDefault": {
          "type": "string",
          "description": "The default value of the column."
        }
      }
    },
    "Field": {
      "type": "object",
      "properties": {
        "isNull": {
          "type": "boolean",
          "description": "A value that indicates whether the data is NULL."
        },
        "booleanValue": {
          "type": "boolean",
          "description": "A value of the Boolean data type."
        },
        "longValue": {
          "type": "integer",
          "description": "A value of the long data type."
        },
        "doubleValue": {
          "type": "number",
          "description": "A value of the double data type."
        },
        "stringValue": {
          "type": "string",
          "description": "A value of the string data type."
        },
        "blobValue": {
          "type": "string",
          "format": "byte",
          "description": "A value of the BLOB data type."
        }
      },
      "description": "Exactly one member is set."
    }
  }
}