v11

latestOpenAPI 3.1.0raw.githubusercontent.com2026-03-051387180.3 KB
compiler

Resolve query template

Resolve a query template with user-selected parameters.

Takes a query reference and variable selections, returns the fully resolved query object ready for compilation.

RLS: Filtered to current client (ClientRLSDB).

post/api/v1/compiler/resolve

Query parameters

sourcestring nullable

Headers

X-Kater-CLI-IDstring nullable

Request body

auto_fixboolean

Automatically fix broken refs caused by renames. Defaults to True.

combinationstring

Comma-separated slot selections and variable assignments. Reserved keys: measure, dimension, filter, calculation. All other keys are variable assignments. Example: 'measure=Compliance Rate,dimension=Department,breakdown=region'

connection_idstring uuid required

Connection to resolve against

pinned_variantstring nullable

Optional pinned variant name (e.g. '_base'). Selects a specific pinned configuration.

query_idstring uuid required

UUID of the query template

Response

Successful Response

request_idstring nullable

Write-back request ID. Non-null when ref-fix files were dispatched to CLI via WebSocket.

Example response

{
  "resolved_query": {
    "chart_hints": [
      {
        "config": {
          "color_by": "ref(created_date)",
          "size": "ref(created_date)",
          "stack_by": "ref(created_date)",
          "x_axis": "ref(created_date)",
          "y_axis": "ref(created_date)"
        }
      }
    ],
    "filters": [
      {
        "exists": {
          "from": "ref(dim_customer.sale_price)"
        },
        "not_exists": {
          "from": "ref(dim_customer.sale_price)"
        }
      }
    ],
    "resolved_chart": {
      "config": {
        "color_by": "ref(created_date)",
        "size": "ref(created_date)",
        "stack_by": "ref(created_date)",
        "x_axis": "ref(created_date)",
        "y_axis": "ref(created_date)"
      }
    },
    "resolved_variables": [
      {
        "allowed_values": {
          "from_column": "ref(dim_customer.sale_price)"
        }
      }
    ],
    "select_from": [
      {
        "ref": "ref(dim_customer.sale_price)"
      }
    ],
    "source_query": "ref(dim_customer.sale_price)",
    "topic": "ref(dim_customer.sale_price)"
  }
}