Apache Druid · JSON Structure

Apache Druid Sql Query Response Structure

Response from the Apache Druid SQL API with query results and metadata.

Type: object Properties: 5
AnalyticsApacheDatabaseKafkaOLAPOpen SourceReal-TimeSQLTime Series

SqlQueryResponse is a JSON Structure definition published by Apache Druid, describing 5 properties. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

queryId columns columnTypes sqlTypes results

Meta-schema: https://json-structure.org/meta/core/v0/#

JSON Structure

Raw ↑
{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/apache-druid/refs/heads/main/json-structure/apache-druid-sql-query-response-structure.json",
  "name": "SqlQueryResponse",
  "description": "Response from the Apache Druid SQL API with query results and metadata.",
  "type": "object",
  "properties": {
    "queryId": {
      "type": "string",
      "description": "Unique ID assigned to this query.",
      "example": "abc-123-def-456"
    },
    "columns": {
      "type": "array",
      "description": "Column names in result order.",
      "items": {
        "type": "string"
      },
      "example": [
        "__time",
        "page",
        "added"
      ]
    },
    "columnTypes": {
      "type": "array",
      "description": "Column Druid types.",
      "items": {
        "type": "string"
      },
      "example": [
        "TIMESTAMP",
        "STRING",
        "LONG"
      ]
    },
    "sqlTypes": {
      "type": "array",
      "description": "Column SQL types.",
      "items": {
        "type": "string"
      },
      "example": [
        "TIMESTAMP",
        "VARCHAR",
        "BIGINT"
      ]
    },
    "results": {
      "type": "array",
      "description": "Query result rows (format depends on resultFormat).",
      "items": {
        "type": "object"
      }
    }
  }
}