{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-blob-storage/json-schema/microsoft-azure-blob-storage-query-request-schema.json",
  "title": "QueryRequest",
  "description": "Groups the set of query request settings.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-blob-storage-openapi.yml#/components/schemas/QueryRequest",
  "type": "object",
  "required": [
    "QueryType",
    "Expression"
  ],
  "properties": {
    "QueryType": {
      "type": "string",
      "description": "Required. The type of the provided query expression.",
      "enum": [
        "SQL"
      ]
    },
    "Expression": {
      "type": "string",
      "description": "The query expression in SQL. The maximum size of the query expression is 256KiB."
    },
    "InputSerialization": {
      "$ref": "#/$defs/QuerySerialization"
    },
    "OutputSerialization": {
      "$ref": "#/$defs/QuerySerialization"
    }
  },
  "$defs": {
    "ArrowConfiguration": {
      "description": "Groups the settings used for formatting the response if the response should be Arrow formatted.",
      "type": "object",
      "required": [
        "Schema"
      ],
      "properties": {
        "Schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ArrowField"
          }
        }
      }
    },
    "ArrowField": {
      "description": "Groups settings regarding specific field of an arrow schema",
      "type": "object",
      "required": [
        "Type"
      ],
      "properties": {
        "Type": {
          "type": "string"
        },
        "Name": {
          "type": "string"
        },
        "Precision": {
          "type": "integer"
        },
        "Scale": {
          "type": "integer"
        }
      }
    },
    "DelimitedTextConfiguration": {
      "description": "Groups the settings used for interpreting the blob data if the blob is delimited text formatted.",
      "type": "object",
      "properties": {
        "ColumnSeparator": {
          "type": "string",
          "description": "The string used to separate columns."
        },
        "FieldQuote": {
          "type": "string",
          "description": "The string used to quote a specific field."
        },
        "RecordSeparator": {
          "type": "string",
          "description": "The string used to separate records."
        },
        "EscapeChar": {
          "type": "string",
          "description": "The string used as an escape character."
        },
        "HeadersPresent": {
          "type": "boolean",
          "description": "Represents whether the data has headers."
        }
      }
    },
    "JsonTextConfiguration": {
      "description": "json text configuration",
      "type": "object",
      "properties": {
        "RecordSeparator": {
          "type": "string",
          "description": "The string used to separate records."
        }
      }
    },
    "ParquetConfiguration": {
      "description": "parquet configuration",
      "type": "object"
    },
    "QueryFormat": {
      "type": "object",
      "required": [
        "Type"
      ],
      "properties": {
        "Type": {
          "$ref": "#/$defs/QueryType"
        },
        "DelimitedTextConfiguration": {
          "$ref": "#/$defs/DelimitedTextConfiguration"
        },
        "JsonTextConfiguration": {
          "$ref": "#/$defs/JsonTextConfiguration"
        },
        "ArrowConfiguration": {
          "$ref": "#/$defs/ArrowConfiguration"
        },
        "ParquetTextConfiguration": {
          "$ref": "#/$defs/ParquetConfiguration"
        }
      }
    },
    "QuerySerialization": {
      "type": "object",
      "required": [
        "Format"
      ],
      "properties": {
        "Format": {
          "$ref": "#/$defs/QueryFormat"
        }
      }
    },
    "QueryType": {
      "type": "string",
      "description": "The quick query format type.",
      "enum": [
        "delimited",
        "json",
        "arrow",
        "parquet"
      ],
      "x-ms-enum": {
        "name": "QueryFormatType",
        "modelAsString": false
      }
    }
  }
}