Looker · Schema

WriteQuery

Writable fields for creating a new query

AnalyticsBI PlatformBusiness IntelligenceData AnalyticsData Visualization

Properties

Name Type Description
model string LookML model name
view string LookML explore (view) name
fields array List of field names to include
pivots array Fields to pivot on
fill_fields array Fields to fill missing values for
filters object Filter expressions keyed by field name
filter_expression string Custom filter expression
sorts array Sort order for results
limit string Maximum rows to return
column_limit string Maximum columns for pivoted results
total boolean Include row totals
row_total string Row total setting
subtotals array Fields to subtotal on
dynamic_fields string JSON string of dynamic field definitions
vis_config object Visualization configuration
query_timezone string Timezone for date/time calculations
View JSON Schema on GitHub

JSON Schema

looker-writequery-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/WriteQuery",
  "title": "WriteQuery",
  "type": "object",
  "required": [
    "model",
    "view"
  ],
  "description": "Writable fields for creating a new query",
  "properties": {
    "model": {
      "type": "string",
      "description": "LookML model name",
      "example": "example_value"
    },
    "view": {
      "type": "string",
      "description": "LookML explore (view) name",
      "example": "example_value"
    },
    "fields": {
      "type": "array",
      "description": "List of field names to include",
      "items": {
        "type": "string"
      },
      "example": []
    },
    "pivots": {
      "type": "array",
      "nullable": true,
      "description": "Fields to pivot on",
      "items": {
        "type": "string"
      },
      "example": []
    },
    "fill_fields": {
      "type": "array",
      "nullable": true,
      "description": "Fields to fill missing values for",
      "items": {
        "type": "string"
      },
      "example": []
    },
    "filters": {
      "type": "object",
      "nullable": true,
      "description": "Filter expressions keyed by field name",
      "additionalProperties": {
        "type": "string"
      },
      "example": "example_value"
    },
    "filter_expression": {
      "type": "string",
      "nullable": true,
      "description": "Custom filter expression",
      "example": "example_value"
    },
    "sorts": {
      "type": "array",
      "nullable": true,
      "description": "Sort order for results",
      "items": {
        "type": "string"
      },
      "example": []
    },
    "limit": {
      "type": "string",
      "nullable": true,
      "description": "Maximum rows to return",
      "example": "example_value"
    },
    "column_limit": {
      "type": "string",
      "nullable": true,
      "description": "Maximum columns for pivoted results",
      "example": "example_value"
    },
    "total": {
      "type": "boolean",
      "description": "Include row totals",
      "example": true
    },
    "row_total": {
      "type": "string",
      "nullable": true,
      "description": "Row total setting",
      "example": "example_value"
    },
    "subtotals": {
      "type": "array",
      "nullable": true,
      "description": "Fields to subtotal on",
      "items": {
        "type": "string"
      },
      "example": []
    },
    "dynamic_fields": {
      "type": "string",
      "nullable": true,
      "description": "JSON string of dynamic field definitions",
      "example": "example_value"
    },
    "vis_config": {
      "type": "object",
      "nullable": true,
      "description": "Visualization configuration",
      "additionalProperties": true,
      "example": "example_value"
    },
    "query_timezone": {
      "type": "string",
      "nullable": true,
      "description": "Timezone for date/time calculations",
      "example": "example_value"
    }
  }
}