compiler

Resolve query template

Changed on

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

Request

  • Base URL
    https://api.kater.ai
  • Auth
    • HTTP bearer
    • or API key in header X-API-Key

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)"
  }
}

Changes

    • breaking

      added the new required request property

    • warning

      removed the request property

    • info

      added the new optional request property

    • breaking

      response property errors list-of-types was widened by adding types array to media type application/json of response 400

    • breaking

      response property errors list-of-types was widened by adding types array to media type application/json of response 401

    • breaking

      response property errors list-of-types was widened by adding types array to media type application/json of response 403

    • breaking

      response property errors list-of-types was widened by adding types array to media type application/json of response 404

    • breaking

      response property errors list-of-types was widened by adding types array to media type application/json of response 422

    • breaking

      response property errors list-of-types was widened by adding types array to media type application/json of response 500

    • breaking

      response property resolved_query/resolved_variables/anyOf[subschema #1]/items/bound_value list-of-types was widened by adding types array to media type application/json of response 200

    • breaking

      response property resolved_query/resolved_variables/anyOf[subschema #1]/items/default list-of-types was widened by adding types array to media type application/json of response 200

    • warning

      removed the optional property / from the response with the status

    • warning

      added the new DATE[] enum value to the //// response property for the response status

    • warning

      added the new FLOAT[] enum value to the //// response property for the response status

    • warning

      added the new INT[] enum value to the //// response property for the response status

    • warning

      added the new STRING[] enum value to the //// response property for the response status

    • warning

      added the new axis_metric_by_dimension enum value to the /// response property for the response status

    • warning

      added the new axis_metric_by_dimensiondate enum value to the /// response property for the response status

    • warning

      added the new axis_metric_by_dimensiondate_sliced_by_dimension enum value to the /// response property for the response status

    • warning

      added the new axis_scatter_plot enum value to the /// response property for the response status

    • warning

      added the new dimension_date enum value to the ////// response property for the response status

    • warning

      added the new funnel enum value to the / response property for the response status

    • warning

      added the new funnel_funnel_chart enum value to the /// response property for the response status

    • warning

      added the new heatmap_heatmap enum value to the /// response property for the response status

    • warning

      added the new image enum value to the / response property for the response status

    • warning

      added the new image_image_grid enum value to the /// response property for the response status

    • warning

      added the new image_single_image enum value to the /// response property for the response status

    • warning

      added the new kpi_card enum value to the / response property for the response status

    • warning

      added the new kpi_measure_with_dimension_expression enum value to the /// response property for the response status

    • warning

      added the new kpi_measure_with_secondary_metric enum value to the /// response property for the response status

    • warning

      added the new kpi_single_measure_compared_to_prev_period_sparkline enum value to the /// response property for the response status

    • warning

      added the new kpi_single_value enum value to the /// response property for the response status

    • warning

      added the new pie_pie_chart enum value to the /// response property for the response status

    • warning

      added the new table_data_table enum value to the /// response property for the response status

    • warning

      added the new table_fancy_subtotal_table enum value to the /// response property for the response status

    • warning

      added the new table_key_value_list enum value to the /// response property for the response status

    • warning

      added the new table_styled_table enum value to the /// response property for the response status

    • warning

      added the new text enum value to the / response property for the response status

    • warning

      added the new text_data_readout_with_sparkline enum value to the /// response property for the response status

    • warning

      added the new text_narrative_text enum value to the /// response property for the response status

    • info

      added the new optional request property

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property //// to the response with the status

    • info

      added to the /// response property anyOf list for the response status

    • info

      removed from the /// response property anyOf list for the response status

    • info

      removed the area_chart enum value from the /// response property for the response status

    • info

      removed the bar_chart enum value from the /// response property for the response status

    • info

      removed the card_grid enum value from the /// response property for the response status

    • info

      removed the data_table enum value from the /// response property for the response status

    • info

      removed the donut_chart enum value from the /// response property for the response status

    • info

      removed the gauge enum value from the /// response property for the response status

    • info

      removed the heatmap enum value from the /// response property for the response status

    • info

      removed the image enum value from the /// response property for the response status

    • info

      removed the key_value_list enum value from the /// response property for the response status

    • info

      removed the kpi_card enum value from the /// response property for the response status

    • info

      removed the line_chart enum value from the /// response property for the response status

    • info

      removed the pie_chart enum value from the /// response property for the response status

    • info

      removed the scatter_chart enum value from the /// response property for the response status

    • info

      removed the single_value enum value from the / response property for the response status

    • info

      removed the stat_cards enum value from the /// response property for the response status

    • info

      removed the static enum value from the / response property for the response status

    • info

      removed the styled_table enum value from the /// response property for the response status

    • info

      removed the text enum value from the /// response property for the response status

    • info

      added the required property //// to the response with the status