> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lightdash.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List my query history

> Lists the requesting user's own query history for a project, newest
first, with per-trigger and per-window counts.

Must stay declared before `getAsyncQueryResults` so the generated
`/history` route is matched before `/{queryUuid}`.



## OpenAPI

````yaml https://raw.githubusercontent.com/lightdash/lightdash/refs/heads/main/packages/backend/src/generated/swagger.json get /api/v2/projects/{projectUuid}/query/history
openapi: 3.0.0
info:
  title: Lightdash API
  version: 1.207.0
  description: >
    Open API documentation for all public Lightdash API endpoints. #
    Authentication Before you get started, you might need to create a Personal
    Access Token to authenticate via the API. You can create a token by
    following this guide: https://docs.lightdash.com/references/personal_tokens
  license:
    name: MIT
  contact:
    name: Lightdash Support
    email: support@lightdash.com
    url: https://docs.lightdash.com/help-and-contact/contact/contact_info/
servers:
  - url: /
security: []
tags:
  - name: My Account
    description: These routes allow users to manage their own user account.
  - name: Organizations
    description: >-
      Each user is a member of a single organization. These routes allow users
      to manage their organization. Most actions are only available to admin
      users.
  - name: Projects
    description: >-
      Projects belong to a single organization. These routes allow users to
      manage their projects, browse content, and execute queries. Users inside
      an organization might have access to a project from an organization-level
      role or they might be granted access to a project directly.
  - name: Spaces
    description: >-
      Spaces allow you to organize charts and dashboards within a project. They
      also allow granular access to content by allowing you to create private
      spaces, which are only accessible to the creator and admins.
  - name: Roles & Permissions
    description: >-
      These routes allow users to manage roles and permissions for their
      organization.
    externalDocs:
      url: https://docs.lightdash.com/references/roles
  - name: Query
    description: >-
      These routes allow users to execute and manage queries against their data
      warehouse. This includes metric queries, SQL queries, and retrieving query
      results.
paths:
  /api/v2/projects/{projectUuid}/query/history:
    get:
      tags:
        - v2
        - Query
      summary: List my query history
      description: |-
        Lists the requesting user's own query history for a project, newest
        first, with per-trigger and per-window counts.

        Must stay declared before `getAsyncQueryResults` so the generated
        `/history` route is matched before `/{queryUuid}`.
      operationId: getQueryHistory
      parameters:
        - in: path
          name: projectUuid
          required: true
          schema:
            type: string
        - description: Page number for pagination (starts at 1)
          in: query
          name: page
          required: false
          schema:
            default: 1
            format: double
            type: number
        - description: 'Number of results per page (default: 25, max: 100)'
          in: query
          name: pageSize
          required: false
          schema:
            default: 25
            format: double
            type: number
        - description: Filter by what triggered the run
          in: query
          name: trigger
          required: false
          schema:
            $ref: '#/components/schemas/QueryTrigger'
        - description: Filter by query language
          in: query
          name: language
          required: false
          schema:
            $ref: '#/components/schemas/QueryLanguage'
        - description: Filter by one or more statuses
          in: query
          name: status
          required: false
          schema:
            type: array
            items:
              $ref: '#/components/schemas/QueryHistoryStatus'
        - description: Matches explore name, chart/dashboard name, fields and SQL
          in: query
          name: search
          required: false
          schema:
            type: string
        - description: Restrict rows to one disjoint time window
          in: query
          name: window
          required: false
          schema:
            $ref: '#/components/schemas/QueryHistoryWindow'
        - description: Sort order; runtime flattens the windows into one sorted list
          in: query
          name: sortBy
          required: false
          schema:
            $ref: '#/components/schemas/QueryHistorySortBy'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiQueryHistoryListResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorPayload'
      security: []
components:
  schemas:
    QueryTrigger:
      description: >-
        User-facing grouping of `QueryExecutionContext` values by what triggered
        the

        run: a person acting directly, an app surface loading many queries at
        once

        (dashboards, embeds, data apps), or a schedule running in the
        background.
      enum:
        - interactive
        - apps
        - scheduled
      type: string
    QueryLanguage:
      enum:
        - semantic
        - sql
      type: string
    QueryHistoryStatus:
      enum:
        - pending
        - queued
        - executing
        - expired
        - ready
        - error
        - cancelled
      type: string
    QueryHistoryWindow:
      description: >-
        Time windows for the query history list, newest first. Windows are
        disjoint:

        "last hour" excludes the last few minutes, and so on. Anything older
        than 30

        days is out of scope for the page.
      enum:
        - lastFewMinutes
        - lastHour
        - last24Hours
        - last7Days
        - last30Days
      type: string
    QueryHistorySortBy:
      enum:
        - createdAt
        - runtime
      type: string
    ApiQueryHistoryListResponse:
      $ref: >-
        #/components/schemas/ApiSuccess__data-QueryHistoryListItem-Array--pagination_63_-KnexPaginateArgs-and-_totalPageCount-number--totalResults-number_--counts-QueryHistoryCounts__
    ApiErrorPayload:
      properties:
        error:
          properties:
            data:
              $ref: '#/components/schemas/AnyType'
              description: Optional data containing details of the error
            message:
              type: string
              description: A friendly message summarising the error
            name:
              type: string
              description: Unique name for the type of error
            statusCode:
              type: number
              format: integer
              description: HTTP status code
          required:
            - name
            - statusCode
          type: object
        status:
          type: string
          enum:
            - error
          nullable: false
      required:
        - error
        - status
      type: object
      description: |-
        The Error object is returned from the api any time there is an error.
        The message contains
    ApiSuccess__data-QueryHistoryListItem-Array--pagination_63_-KnexPaginateArgs-and-_totalPageCount-number--totalResults-number_--counts-QueryHistoryCounts__:
      properties:
        results:
          properties:
            counts:
              $ref: '#/components/schemas/QueryHistoryCounts'
            pagination:
              allOf:
                - $ref: '#/components/schemas/KnexPaginateArgs'
                - properties:
                    totalResults:
                      type: number
                      format: double
                    totalPageCount:
                      type: number
                      format: double
                  required:
                    - totalResults
                    - totalPageCount
                  type: object
            data:
              items:
                $ref: '#/components/schemas/QueryHistoryListItem'
              type: array
          required:
            - counts
            - data
          type: object
        status:
          type: string
          enum:
            - ok
          nullable: false
      required:
        - results
        - status
      type: object
    AnyType:
      description: |-
        This AnyType is an alias for any
        The goal is to make it easier to identify any type in the codebase
        without having to eslint-disable all the time
        These are only used on legacy `any` types, don't use it for new types.
        This is added on a separate file to avoid circular dependencies.
    QueryHistoryCounts:
      properties:
        warehouseTimeMsLast7Days:
          type: number
          format: double
          description: Warehouse time spent in the last 7 days, for the page subtitle.
        total:
          type: number
          format: double
        windows:
          $ref: '#/components/schemas/Record_QueryHistoryWindow.number_'
          description: Per-window totals with every filter except `window` applied.
        triggers:
          $ref: '#/components/schemas/Record_QueryTrigger.number_'
          description: Per-trigger totals with every filter except `trigger` applied.
      required:
        - warehouseTimeMsLast7Days
        - total
        - windows
        - triggers
      type: object
    KnexPaginateArgs:
      properties:
        page:
          type: number
          format: double
        pageSize:
          type: number
          format: double
      required:
        - page
        - pageSize
      type: object
    QueryHistoryListItem:
      properties:
        erroredAt:
          type: string
          format: date-time
          nullable: true
        resultsUpdatedAt:
          type: string
          format: date-time
          nullable: true
        processingStartedAt:
          type: string
          format: date-time
          nullable: true
        resultsExpiresAt:
          type: string
          format: date-time
          nullable: true
        cacheHit:
          type: boolean
          description: True when this run was served from a previously cached results file.
        warehouseExecutionTimeMs:
          type: number
          format: double
          nullable: true
        totalRowCount:
          type: number
          format: double
          nullable: true
        compiledSql:
          type: string
        dashboardUuid:
          type: string
          nullable: true
        dashboardName:
          type: string
          nullable: true
        savedSqlUuid:
          type: string
          nullable: true
        chartUuid:
          type: string
          nullable: true
        chartName:
          type: string
          nullable: true
        requestParameters:
          $ref: '#/components/schemas/ExecuteAsyncQueryRequestParams'
          description: The original execute request, replayed verbatim by "Re-run".
        metricQuery:
          allOf:
            - $ref: '#/components/schemas/MetricQuery'
          nullable: true
          description: Present on semantic runs — lets the client rebuild an Explore URL.
        exploreName:
          type: string
          nullable: true
        error:
          type: string
          nullable: true
        subline:
          type: string
          description: >-
            Semantic: metric/dimension labels. SQL: first line of SQL. Failed:
            error.
        title:
          type: string
          description: 'Semantic: explore name. SQL: saved chart name or first CTE/table.'
        status:
          $ref: '#/components/schemas/QueryHistoryStatus'
        language:
          $ref: '#/components/schemas/QueryLanguage'
        trigger:
          $ref: '#/components/schemas/QueryTrigger'
        context:
          $ref: '#/components/schemas/QueryExecutionContext'
        projectUuid:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
        queryUuid:
          type: string
      required:
        - erroredAt
        - resultsUpdatedAt
        - processingStartedAt
        - resultsExpiresAt
        - cacheHit
        - warehouseExecutionTimeMs
        - totalRowCount
        - compiledSql
        - dashboardUuid
        - dashboardName
        - savedSqlUuid
        - chartUuid
        - chartName
        - requestParameters
        - metricQuery
        - exploreName
        - error
        - subline
        - title
        - status
        - language
        - trigger
        - context
        - projectUuid
        - createdAt
        - queryUuid
      type: object
      description: >-
        One row of the "My query history" list. Derived fields (trigger,
        language,

        title, subline) are computed server-side from the persisted query so
        every

        consumer renders the same anatomy.
    Record_QueryHistoryWindow.number_:
      properties:
        lastFewMinutes:
          type: number
          format: double
        lastHour:
          type: number
          format: double
        last24Hours:
          type: number
          format: double
        last7Days:
          type: number
          format: double
        last30Days:
          type: number
          format: double
      required:
        - lastFewMinutes
        - lastHour
        - last24Hours
        - last7Days
        - last30Days
      type: object
      description: Construct a type with a set of properties K of type T
    Record_QueryTrigger.number_:
      properties:
        interactive:
          type: number
          format: double
        apps:
          type: number
          format: double
        scheduled:
          type: number
          format: double
      required:
        - interactive
        - apps
        - scheduled
      type: object
      description: Construct a type with a set of properties K of type T
    ExecuteAsyncQueryRequestParams:
      anyOf:
        - $ref: '#/components/schemas/ExecuteAsyncMetricQueryRequestParams'
        - $ref: '#/components/schemas/ExecuteAsyncMergeQueryRequestParams'
        - $ref: '#/components/schemas/ExecuteAsyncSqlQueryRequestParams'
        - $ref: '#/components/schemas/ExecuteAsyncComposeSqlQueryRequestParams'
        - $ref: '#/components/schemas/ExecuteAsyncSavedChartRequestParams'
        - $ref: '#/components/schemas/ExecuteAsyncDashboardChartRequestParams'
        - $ref: '#/components/schemas/ExecuteAsyncUnderlyingDataRequestParams'
        - $ref: '#/components/schemas/ExecuteAsyncDashboardSqlChartRequestParams'
        - $ref: '#/components/schemas/ExecuteAsyncFieldValueSearchRequestParams'
    MetricQuery:
      properties:
        metadata:
          properties:
            hasADateDimension:
              $ref: >-
                #/components/schemas/Pick_CompiledDimension.label-or-name-or-table_
          required:
            - hasADateDimension
          type: object
        pivotDimensions:
          items:
            $ref: '#/components/schemas/FieldId'
          type: array
          description: >-
            Dimension field IDs used as pivot columns (from chart's
            pivotConfig.columns).

            Used by row_total() to determine non-pivot dimensions for GROUP BY.
        timezone:
          type: string
          description: Timezone for date/time values (e.g., 'America/Los_Angeles', 'UTC')
        dimensionOverrides:
          $ref: '#/components/schemas/DimensionOverrides'
          description: Override formatting options for existing dimensions
        metricOverrides:
          $ref: '#/components/schemas/MetricOverrides'
          description: Override formatting options for existing metrics
        customDimensions:
          items:
            $ref: '#/components/schemas/CustomDimension'
          type: array
          description: Custom dimensions defined inline
        additionalMetrics:
          items:
            $ref: '#/components/schemas/AdditionalMetric'
          type: array
          description: Custom metrics defined inline (ad-hoc metrics not in the dbt model)
        tableCalculations:
          items:
            $ref: '#/components/schemas/TableCalculation'
          type: array
          description: Custom calculations to perform on query results
        limit:
          type: number
          format: double
          description: Maximum number of rows to return
        sorts:
          items:
            $ref: '#/components/schemas/SortField'
          type: array
          description: Sort configuration for query results
        filters:
          $ref: '#/components/schemas/Filters'
          description: Filter rules to apply to the query
        metrics:
          items:
            $ref: '#/components/schemas/FieldId'
          type: array
          description: List of metric field IDs to include
        dimensions:
          items:
            $ref: '#/components/schemas/FieldId'
          type: array
          description: List of dimension field IDs to include
        exploreName:
          type: string
          description: The name of the explore to query
      required:
        - tableCalculations
        - limit
        - sorts
        - filters
        - metrics
        - dimensions
        - exploreName
      type: object
    QueryExecutionContext:
      enum:
        - dashboardView
        - autorefreshedDashboard
        - exploreView
        - filterAutocomplete
        - chartView
        - chartHistory
        - sqlChartView
        - sqlRunner
        - viewUnderlyingData
        - alert
        - scheduledDelivery
        - csvDownload
        - gsheets
        - scheduledGsheetsChart
        - scheduledGsheetsDashboard
        - scheduledGsheetsSqlChart
        - scheduledChart
        - scheduledDashboard
        - calculateTotal
        - calculateSubtotal
        - embed
        - ai
        - mcp.run_metric_query
        - mcp.run_sql
        - mcp.search_field_values
        - api
        - cli
        - metricsExplorer
        - preAggregateMaterialization
        - composeSqlRunner
        - multiSourceQuery
        - dataAppSample
      type: string
    ExecuteAsyncMetricQueryRequestParams:
      allOf:
        - $ref: '#/components/schemas/CommonExecuteQueryRequestParams'
        - properties:
            dashboardFilters:
              $ref: '#/components/schemas/DashboardFilters'
            pivotConfiguration:
              $ref: '#/components/schemas/PivotConfiguration'
            dateZoom:
              $ref: '#/components/schemas/DateZoom'
            query:
              $ref: '#/components/schemas/Omit_MetricQueryRequest.csvLimit_'
          required:
            - query
          type: object
    ExecuteAsyncMergeQueryRequestParams:
      allOf:
        - $ref: '#/components/schemas/CommonExecuteQueryRequestParams'
        - properties:
            pivotConfiguration:
              $ref: '#/components/schemas/PivotConfiguration'
            mergeQuery:
              $ref: '#/components/schemas/MergeQuery'
          required:
            - mergeQuery
          type: object
      description: 'A merge run: the spec that produced it, recorded verbatim.'
    ExecuteAsyncSqlQueryRequestParams:
      allOf:
        - $ref: '#/components/schemas/CommonExecuteQueryRequestParams'
        - properties:
            pivotConfiguration:
              $ref: '#/components/schemas/PivotConfiguration'
            limit:
              type: number
              format: double
            sql:
              type: string
          required:
            - sql
          type: object
    ExecuteAsyncComposeSqlQueryRequestParams:
      allOf:
        - $ref: '#/components/schemas/CommonExecuteQueryRequestParams'
        - properties:
            references:
              $ref: '#/components/schemas/Record_string.UUID_'
              description: >-
                Results of other async queries exposed to the SQL as tables,

                keyed by table name: {"orders": "<queryUuid>"} lets the SQL run

                SELECT * FROM orders. Each referenced query is authorized with
                the

                same access checks as fetching its results by uuid; references
                to

                still-running queries are waited on before this query executes.


                Typed Record<string, UUID> (not Record<string, string>) on
                purpose:

                TSOA compiles a string-valued record to an empty object literal
                and

                validation then strips every key; a ref-aliased value type keeps

                additionalProperties intact (and validates the uuid format).
            limit:
              type: number
              format: double
            sql:
              type: string
          required:
            - sql
          type: object
    ExecuteAsyncSavedChartRequestParams:
      allOf:
        - $ref: '#/components/schemas/CommonExecuteQueryRequestParams'
        - properties:
            dashboardFilters:
              $ref: '#/components/schemas/DashboardFilters'
            filters:
              $ref: '#/components/schemas/Filters'
            pivotResults:
              type: boolean
            limit:
              type: number
              format: double
              nullable: true
            versionUuid:
              type: string
            chartUuid:
              type: string
          required:
            - chartUuid
          type: object
    ExecuteAsyncDashboardChartRequestParams:
      allOf:
        - $ref: '#/components/schemas/CommonExecuteQueryRequestParams'
        - properties:
            pivotResults:
              type: boolean
            limit:
              type: number
              format: double
              nullable: true
            dateZoom:
              $ref: '#/components/schemas/DateZoom'
            dashboardSorts:
              items:
                $ref: '#/components/schemas/SortField'
              type: array
            dashboardFilters:
              $ref: '#/components/schemas/DashboardFilters'
            dashboardUuid:
              type: string
            tileUuid:
              type: string
            chartUuid:
              type: string
          required:
            - dashboardSorts
            - dashboardFilters
            - dashboardUuid
            - tileUuid
            - chartUuid
          type: object
    ExecuteAsyncUnderlyingDataRequestParams:
      allOf:
        - $ref: '#/components/schemas/CommonExecuteQueryRequestParams'
        - properties:
            sorts:
              items:
                $ref: '#/components/schemas/SortField'
              type: array
            limit:
              type: number
              format: double
              nullable: true
            dateZoom:
              $ref: '#/components/schemas/DateZoom'
            filters:
              $ref: '#/components/schemas/Filters'
            underlyingDataItemId:
              type: string
            underlyingDataSourceQueryUuid:
              type: string
          required:
            - filters
            - underlyingDataSourceQueryUuid
          type: object
    ExecuteAsyncDashboardSqlChartRequestParams:
      anyOf:
        - $ref: >-
            #/components/schemas/ExecuteAsyncDashboardSqlChartByUuidRequestParams
        - $ref: >-
            #/components/schemas/ExecuteAsyncDashboardSqlChartBySlugRequestParams
    ExecuteAsyncFieldValueSearchRequestParams:
      allOf:
        - $ref: '#/components/schemas/CommonExecuteQueryRequestParams'
        - properties:
            forceRefresh:
              type: boolean
            filters:
              $ref: '#/components/schemas/AndFilterGroup'
            limit:
              type: number
              format: double
            search:
              type: string
            fieldId:
              type: string
            table:
              type: string
          required:
            - search
            - fieldId
            - table
          type: object
    Pick_CompiledDimension.label-or-name-or-table_:
      properties:
        name:
          type: string
        label:
          type: string
        table:
          type: string
      required:
        - name
        - label
        - table
      type: object
      description: From T, pick a set of properties whose keys are in the union K
    FieldId:
      type: string
    DimensionOverrides:
      properties: {}
      additionalProperties:
        $ref: '#/components/schemas/Pick_Dimension.formatOptions_'
      type: object
    MetricOverrides:
      properties: {}
      additionalProperties:
        $ref: '#/components/schemas/Pick_Metric.formatOptions_'
      type: object
    CustomDimension:
      anyOf:
        - $ref: '#/components/schemas/CustomBinDimension'
        - $ref: '#/components/schemas/CustomSqlDimension'
    AdditionalMetric:
      properties:
        label:
          type: string
          description: Display label for the metric
        type:
          $ref: '#/components/schemas/MetricType'
          description: Aggregation type
        description:
          type: string
          description: Description of what the metric measures
        sql:
          type: string
          description: SQL expression (e.g., ${TABLE}.column_name)
        hidden:
          type: boolean
          description: Whether the metric is hidden from users
        round:
          type: number
          format: double
          description: Number of decimal places
        compact:
          $ref: '#/components/schemas/CompactOrAlias'
          description: Compact format for large numbers
        format:
          anyOf:
            - $ref: '#/components/schemas/Format'
            - type: string
          description: Format string (legacy format specification)
        separator:
          $ref: '#/components/schemas/NumberSeparator'
          description: Number separator style for grouping/decimal characters
        table:
          type: string
          description: Table name the metric belongs to
        name:
          type: string
          description: Internal name of the metric
        index:
          type: number
          format: double
          description: Display order index
        filters:
          items:
            $ref: '#/components/schemas/MetricFilterRule'
          type: array
          description: Filters to apply to this metric
        baseDimensionName:
          type: string
          description: Name of the base dimension/column this metric aggregates
        baseMetricName:
          type: string
          description: Name of the explore metric this metric was cloned from
        uuid:
          type: string
          nullable: true
          description: Unique identifier for the metric
        percentile:
          type: number
          format: double
          description: Percentile value for percentile metrics
        distinctKeys:
          items:
            type: string
          type: array
        formatOptions:
          $ref: '#/components/schemas/CustomFormat'
          description: Formatting configuration
        generationType:
          type: string
          enum:
            - periodOverPeriod
          nullable: false
          description: |-
            Optional marker for metrics generated by the system.
            Currently used for Period-over-Period (PoP) previous-period metrics.
        baseMetricId:
          $ref: '#/components/schemas/FieldId'
          description: >-
            For PoP-generated metrics, the base metric id that this metric is
            derived from.
        timeDimensionId:
          $ref: '#/components/schemas/FieldId'
          description: >-
            For PoP-generated metrics, the time dimension id used for the
            comparison.
        granularity:
          $ref: '#/components/schemas/TimeFrames'
          description: For PoP-generated metrics, the granularity used for the comparison.
        periodOffset:
          type: number
          format: double
          description: >-
            For PoP-generated metrics, the number of periods to offset by (>=
            1).
      required:
        - type
        - sql
        - table
        - name
      type: object
      additionalProperties: true
    TableCalculation:
      anyOf:
        - $ref: '#/components/schemas/SqlTableCalculation'
        - $ref: '#/components/schemas/TemplateTableCalculation'
        - $ref: '#/components/schemas/FormulaTableCalculation'
    SortField:
      properties:
        pivotValues:
          items:
            $ref: '#/components/schemas/PivotSortAnchor'
          type: array
          description: >-
            Pins the row-sort anchor to a specific pivot column. Ignored for
            non-pivoted results.
        nullsFirst:
          type: boolean
          description: Sort null values first
        descending:
          type: boolean
          description: Sort in descending order
        fieldId:
          type: string
          description: Field ID to sort by
      required:
        - descending
        - fieldId
      type: object
    Filters:
      properties:
        tableCalculations:
          $ref: '#/components/schemas/FilterGroup'
          description: Table calculation filter group
        metrics:
          $ref: '#/components/schemas/FilterGroup'
          description: Metric filter group
        dimensions:
          $ref: '#/components/schemas/FilterGroup'
          description: Dimension filter group
      type: object
    CommonExecuteQueryRequestParams:
      properties:
        parameters:
          $ref: '#/components/schemas/ParametersValuesMap'
        usePreAggregateCache:
          type: boolean
        invalidateCache:
          type: boolean
        context:
          $ref: '#/components/schemas/QueryExecutionContext'
      type: object
    DashboardFilters:
      properties:
        tableCalculations:
          items:
            $ref: '#/components/schemas/DashboardFilterRule'
          type: array
        metrics:
          items:
            $ref: '#/components/schemas/DashboardFilterRule'
          type: array
        dimensions:
          items:
            $ref: '#/components/schemas/DashboardFilterRule'
          type: array
      required:
        - tableCalculations
        - metrics
        - dimensions
      type: object
    PivotConfiguration:
      properties:
        pivotColumnsOrder:
          items:
            $ref: '#/components/schemas/GroupByColumn'
          type: array
          description: >-
            Declared order of the pivot-column dimensions (visible
            `groupByColumns`

            plus hidden `sortOnlyDimensions`) as they appear in the chart's

            `pivotConfig.columns`. `column_ranking` orders columns by this
            sequence so

            a hidden sort-only dim sorts at its DECLARED position — hiding a dim
            then

            leaves column order identical to when it was visible, instead of
            hoisting

            the hidden dim to the front of the ORDER BY. Passthrough (hidden,
            non-sort)

            dims are excluded since they don't drive sort. When omitted,
            ordering falls

            back to hoisting sort-only sort targets to the front (legacy
            behavior).
        passthroughDimensions:
          items:
            $ref: '#/components/schemas/GroupByColumn'
          type: array
          description: >-
            Hidden pivot-column dimensions that are NOT sort targets but still
            need

            their values carried through the SQL pipeline so that other fields'

            `richText` / `image:` templates can reference them via

            `row.<table>.<field>.raw`. They participate in `group_by_query`
            SELECT

            and GROUP BY (same as sortOnlyDimensions) but do NOT affect

            `column_ranking` ORDER BY (they don't drive sort). Without this
            bucket

            the dim would be dropped entirely from the query and `row.*.raw`

            references would silently resolve to undefined.
        sortOnlyDimensions:
          items:
            $ref: '#/components/schemas/GroupByColumn'
          type: array
          description: >-
            Dimensions referenced by ORDER BY but NOT spread into pivot columns.

            Used when a user hides a dim that's part of `pivotConfig.columns`
            and has

            a sort entry on it: the dim still ranks column order via the GROUP
            BY /

            ORDER BY pipeline, but it doesn't become a pivot column header
            level.

            Mirrors `sortOnlyColumns` (which serves the same purpose for
            metrics).
        sortOnlyColumns:
          items:
            $ref: '#/components/schemas/ValuesColumn'
          type: array
          description: >-
            Metrics/table calculations needed for sort anchor CTEs but not for
            display.

            These are merged into valuesColumns for SQL generation in
            PivotQueryBuilder,

            but excluded from pivotDetails so they don't appear as chart series.
        metricsAsRows:
          type: boolean
          description: |-
            When true, metrics are displayed as rows instead of columns.
            This affects column limit calculation - when metrics are rows,
            we don't need to divide the column limit by the number of metrics.
            Defaults to false for backward compatibility (SQL runner behavior).
        sortBy:
          $ref: '#/components/schemas/SortBy'
        groupByColumns:
          items:
            $ref: '#/components/schemas/GroupByColumn'
          type: array
        valuesColumns:
          items:
            $ref: '#/components/schemas/ValuesColumn'
          type: array
        indexColumn:
          anyOf:
            - $ref: '#/components/schemas/PivotIndexColum'
            - items:
                $ref: '#/components/schemas/PivotIndexColum'
              type: array
      required:
        - valuesColumns
      type: object
    DateZoom:
      properties:
        xAxisFieldId:
          type: string
        granularity:
          anyOf:
            - $ref: '#/components/schemas/DateGranularity'
            - type: string
      type: object
    Omit_MetricQueryRequest.csvLimit_:
      $ref: >-
        #/components/schemas/Pick_MetricQueryRequest.Exclude_keyofMetricQueryRequest.csvLimit__
      description: Construct a type with the properties of T except for those in type K.
    MergeQuery:
      properties:
        limit:
          type: number
          format: double
        tableCalculations:
          items:
            $ref: '#/components/schemas/MergeTableCalculation'
          type: array
          description: Calculations over the merged result. Applied last, after any pivot.
        joinType:
          $ref: '#/components/schemas/MergeJoinType'
        joinKey:
          items:
            $ref: '#/components/schemas/MergeJoinKeyPart'
          type: array
        sources:
          items:
            $ref: '#/components/schemas/MergeQuerySource'
          type: array
      required:
        - limit
        - tableCalculations
        - joinType
        - joinKey
        - sources
      type: object
    Record_string.UUID_:
      properties: {}
      additionalProperties:
        type: string
      type: object
      description: Construct a type with a set of properties K of type T
    ExecuteAsyncDashboardSqlChartByUuidRequestParams:
      allOf:
        - $ref: '#/components/schemas/ExecuteAsyncDashboardSqlChartCommonParams'
        - properties:
            savedSqlUuid:
              type: string
          required:
            - savedSqlUuid
          type: object
    ExecuteAsyncDashboardSqlChartBySlugRequestParams:
      allOf:
        - $ref: '#/components/schemas/ExecuteAsyncDashboardSqlChartCommonParams'
        - properties:
            slug:
              type: string
          required:
            - slug
          type: object
    AndFilterGroup:
      properties:
        and:
          items:
            $ref: '#/components/schemas/FilterGroupItem'
          type: array
          description: Array of filters or nested groups combined with AND logic
        id:
          type: string
          description: Unique identifier for the filter group
      required:
        - and
        - id
      type: object
    Pick_Dimension.formatOptions_:
      properties:
        formatOptions:
          $ref: '#/components/schemas/CustomFormat'
      type: object
      description: From T, pick a set of properties whose keys are in the union K
    Pick_Metric.formatOptions_:
      properties:
        formatOptions:
          $ref: '#/components/schemas/CustomFormat'
      type: object
      description: From T, pick a set of properties whose keys are in the union K
    CustomBinDimension:
      anyOf:
        - $ref: '#/components/schemas/FixedNumberBinDimension'
        - $ref: '#/components/schemas/FixedWidthBinDimension'
        - $ref: '#/components/schemas/CustomRangeBinDimension'
        - $ref: '#/components/schemas/CustomGroupBinDimension'
    CustomSqlDimension:
      properties:
        id:
          type: string
          description: Unique identifier for the custom dimension
        name:
          type: string
          description: Display name for the custom dimension
        table:
          type: string
          description: Table this custom dimension belongs to
        type:
          $ref: '#/components/schemas/CustomDimensionType.SQL'
          description: Type of custom dimension (bin or sql)
        sql:
          type: string
          description: SQL expression for the custom dimension
        dimensionType:
          $ref: '#/components/schemas/DimensionType'
          description: Data type of the dimension result
      required:
        - id
        - name
        - table
        - type
        - sql
        - dimensionType
      type: object
      additionalProperties: true
    MetricType:
      enum:
        - percentile
        - average
        - count
        - count_distinct
        - sum
        - sum_distinct
        - average_distinct
        - min
        - max
        - percent_of_previous
        - percent_of_total
        - running_total
        - number
        - median
        - string
        - date
        - timestamp
        - boolean
      type: string
    CompactOrAlias:
      anyOf:
        - $ref: '#/components/schemas/Compact'
        - type: string
          enum:
            - K
            - thousand
            - M
            - million
            - B
            - billion
            - T
            - trillion
            - KB
            - kilobyte
            - MB
            - megabyte
            - GB
            - gigabyte
            - TB
            - terabyte
            - PB
            - petabyte
            - KiB
            - kibibyte
            - MiB
            - mebibyte
            - GiB
            - gibibyte
            - TiB
            - tebibyte
            - PiB
            - pebibyte
    Format:
      enum:
        - km
        - mi
        - si
        - usd
        - gbp
        - eur
        - jpy
        - dkk
        - id
        - percent
      type: string
    NumberSeparator:
      enum:
        - default
        - commaPeriod
        - spacePeriod
        - periodComma
        - noSeparatorPeriod
        - apostrophePeriod
      type: string
    MetricFilterRule:
      description: Filter rule for metrics, targeting fields by reference
      properties:
        includeNull:
          type: boolean
          description: >-
            For the `equals` operator on string fields, also match rows where
            the

            field is null (compiles to `field IN (...) OR field IS NULL`). Lets
            users

            combine null with selected values in a single "is" rule.
        values:
          items:
            $ref: '#/components/schemas/AnyType'
          type: array
          description: Values to filter by
        operator:
          $ref: '#/components/schemas/FilterOperator'
          description: Filter operator
        id:
          type: string
          description: Unique identifier for the filter
        target:
          properties:
            fieldRef:
              type: string
              description: Field reference to filter on (e.g., 'table_name.field_name')
          required:
            - fieldRef
          type: object
          description: Target field for the filter
        settings:
          $ref: '#/components/schemas/AnyType'
          description: Additional settings for date/time filters
        disabled:
          type: boolean
          description: Whether this filter is disabled
        required:
          type: boolean
          description: Whether this filter is required
        caseSensitive:
          type: boolean
          description: >-
            Overrides the field/explore case-sensitivity for this rule only.

            Used by internal features like autocomplete search that must always

            match case-insensitively regardless of the field's configured
            setting.
      required:
        - operator
        - id
        - target
      type: object
      additionalProperties: true
    CustomFormat:
      properties:
        type:
          $ref: '#/components/schemas/CustomFormatType'
          description: Format type
        round:
          type: number
          format: double
          description: Number of decimal places
        separator:
          $ref: '#/components/schemas/NumberSeparator'
          description: Number separator style
        currency:
          type: string
          description: Currency code (e.g., USD, GBP, EUR)
        compact:
          $ref: '#/components/schemas/CompactOrAlias'
          description: Compact format for large numbers (K, M, B, T) or byte units
        prefix:
          type: string
          description: Prefix to prepend to formatted values
        suffix:
          type: string
          description: Suffix to append to formatted values
        timeInterval:
          $ref: '#/components/schemas/TimeFrames'
          description: Time interval for date formatting
        custom:
          type: string
          description: Custom format string
      required:
        - type
      type: object
      additionalProperties: true
    TimeFrames:
      enum:
        - RAW
        - YEAR
        - QUARTER
        - MONTH
        - WEEK
        - DAY
        - HOUR
        - MINUTE
        - SECOND
        - MILLISECOND
        - DAY_OF_WEEK_INDEX
        - DAY_OF_MONTH_NUM
        - DAY_OF_YEAR_NUM
        - WEEK_NUM
        - MONTH_NUM
        - QUARTER_NUM
        - YEAR_NUM
        - DAY_OF_WEEK_NAME
        - MONTH_NAME
        - QUARTER_NAME
        - HOUR_OF_DAY_NUM
        - MINUTE_OF_HOUR_NUM
      type: string
    SqlTableCalculation:
      allOf:
        - $ref: '#/components/schemas/TableCalculationBase'
        - properties:
            sql:
              type: string
              description: >-
                SQL expression for the calculation (can reference fields with
                ${table.field})
          required:
            - sql
          type: object
    TemplateTableCalculation:
      allOf:
        - $ref: '#/components/schemas/TableCalculationBase'
        - properties:
            template:
              $ref: '#/components/schemas/TableCalculationTemplate'
              description: Template-based calculation (alternative to sql)
          required:
            - template
          type: object
    FormulaTableCalculation:
      allOf:
        - $ref: '#/components/schemas/TableCalculationBase'
        - properties:
            formula:
              type: string
              description: Spreadsheet-like formula compiled to SQL at query time
          required:
            - formula
          type: object
    PivotSortAnchor:
      properties:
        value:
          anyOf:
            - type: string
            - type: number
              format: double
            - type: boolean
          nullable: true
        reference:
          type: string
      required:
        - value
        - reference
      type: object
      description: |-
        Coordinates of a single pivot column, used to anchor a row sort to that
        specific column when results are pivoted.
    FilterGroup:
      anyOf:
        - $ref: '#/components/schemas/OrFilterGroup'
        - $ref: '#/components/schemas/AndFilterGroup'
    ParametersValuesMap:
      $ref: '#/components/schemas/Record_string.ParameterValue_'
    DashboardFilterRule:
      allOf:
        - $ref: >-
            #/components/schemas/FilterRule_FilterOperator.DashboardFieldTarget.AnyType.AnyType_
        - properties:
            lockedTabUuids:
              items:
                type: string
              type: array
              description: >-
                Tab UUIDs where this filter is locked. When the active tab is in
                this

                list, viewers see the filter but cannot change it, and URL /
                embed

                filter overrides targeting the same field are ignored on that
                tab.

                Empty or omitted means the filter is not locked anywhere.
            requiredGroupId:
              type: string
              description: >-
                Dashboard filters sharing a requiredGroupId form an "any-one
                required"

                group: the dashboard is locked until at least one member has a
                value.
            singleValue:
              type: boolean
            label:
              type: string
            tileTargets:
              $ref: '#/components/schemas/DashboardTileTargets'
          type: object
    GroupByColumn:
      properties:
        reference:
          type: string
      required:
        - reference
      type: object
    ValuesColumn:
      properties:
        aggregation:
          $ref: '#/components/schemas/VizAggregationOptions'
        reference:
          type: string
      required:
        - aggregation
        - reference
      type: object
    SortBy:
      items:
        $ref: '#/components/schemas/VizSortBy'
      type: array
    PivotIndexColum:
      properties:
        type:
          $ref: '#/components/schemas/VizIndexType'
        reference:
          type: string
      required:
        - type
        - reference
      type: object
    DateGranularity:
      enum:
        - Second
        - Minute
        - Hour
        - Day
        - Week
        - Month
        - Quarter
        - Year
      type: string
    Pick_MetricQueryRequest.Exclude_keyofMetricQueryRequest.csvLimit__:
      properties:
        filters:
          properties:
            tableCalculations: {}
            metrics: {}
            dimensions: {}
          type: object
        exploreName:
          type: string
        dimensions:
          items:
            type: string
          type: array
        metrics:
          items:
            type: string
          type: array
        sorts:
          items:
            $ref: '#/components/schemas/SortField'
          type: array
        limit:
          type: number
          format: double
        tableCalculations:
          items:
            $ref: '#/components/schemas/TableCalculation'
          type: array
        additionalMetrics:
          items:
            $ref: '#/components/schemas/AdditionalMetric'
          type: array
        customDimensions:
          items:
            $ref: '#/components/schemas/CustomDimension'
          type: array
        metricOverrides:
          $ref: '#/components/schemas/MetricOverrides'
        dimensionOverrides:
          $ref: '#/components/schemas/DimensionOverrides'
        timezone:
          type: string
        pivotDimensions:
          items:
            type: string
          type: array
        metadata:
          properties:
            hasADateDimension:
              $ref: >-
                #/components/schemas/Pick_CompiledDimension.name-or-label-or-table_
          required:
            - hasADateDimension
          type: object
        dateZoom:
          $ref: '#/components/schemas/DateZoom'
      required:
        - filters
        - exploreName
        - dimensions
        - metrics
        - sorts
        - limit
        - tableCalculations
      type: object
      description: From T, pick a set of properties whose keys are in the union K
    MergeTableCalculation:
      properties:
        sql:
          type: string
        displayName:
          type: string
        name:
          type: string
      required:
        - sql
        - displayName
        - name
      type: object
      description: >-
        A calculation over the *merged* result, which is the only place a
        row-wise

        calculation across two queries can correctly live. References name a
        source

        and one of its fields, `${sourceId.fieldId}`, because the merged
        statement

        renames columns to keep two sources from colliding.
    MergeJoinType:
      description: >-
        How unmatched keys survive the merge. Mirrors the SQL join it compiles
        to.
      enum:
        - full
        - left
        - inner
      type: string
    MergeJoinKeyPart:
      properties:
        fieldIdBySourceId:
          $ref: '#/components/schemas/Record_string.FieldId_'
          description: The field each source joins on. Every source must have an entry.
        name:
          type: string
          description: Column name this key part takes in the merged result.
      required:
        - fieldIdBySourceId
        - name
      type: object
      description: >-
        One column of the join key. Sources name the same real-world key
        differently

        (`orders.order_date` vs `users.created_date`), so the mapping is
        explicit per

        source rather than positional.
    MergeQuerySource:
      properties:
        metricQuery:
          $ref: '#/components/schemas/MetricQuery'
        id:
          type: string
          description: Stable id. Names the CTE, and the table its merged fields belong to.
      required:
        - metricQuery
        - id
      type: object
      description: 'One side of a merge: a metric query.'
    ExecuteAsyncDashboardSqlChartCommonParams:
      allOf:
        - $ref: '#/components/schemas/CommonExecuteQueryRequestParams'
        - properties:
            limit:
              type: number
              format: double
            dashboardSorts:
              items:
                $ref: '#/components/schemas/SortField'
              type: array
            dashboardFilters:
              $ref: '#/components/schemas/DashboardFilters'
            tileUuid:
              type: string
            dashboardUuid:
              type: string
          required:
            - dashboardSorts
            - dashboardFilters
            - tileUuid
            - dashboardUuid
          type: object
    FilterGroupItem:
      anyOf:
        - $ref: '#/components/schemas/FilterGroup'
        - $ref: '#/components/schemas/FilterRule'
    FixedNumberBinDimension:
      properties:
        id:
          type: string
          description: Unique identifier for the custom dimension
        name:
          type: string
          description: Display name for the custom dimension
        table:
          type: string
          description: Table this custom dimension belongs to
        type:
          $ref: '#/components/schemas/CustomDimensionType.BIN'
          description: Type of custom dimension (bin or sql)
        dimensionId:
          $ref: '#/components/schemas/FieldId'
          description: Field ID of the parent dimension to bin
        binType:
          $ref: '#/components/schemas/BinType.FIXED_NUMBER'
        binNumber:
          type: number
          format: double
      required:
        - id
        - name
        - table
        - type
        - dimensionId
        - binType
        - binNumber
      type: object
      additionalProperties: true
    FixedWidthBinDimension:
      properties:
        id:
          type: string
          description: Unique identifier for the custom dimension
        name:
          type: string
          description: Display name for the custom dimension
        table:
          type: string
          description: Table this custom dimension belongs to
        type:
          $ref: '#/components/schemas/CustomDimensionType.BIN'
          description: Type of custom dimension (bin or sql)
        dimensionId:
          $ref: '#/components/schemas/FieldId'
          description: Field ID of the parent dimension to bin
        binType:
          $ref: '#/components/schemas/BinType.FIXED_WIDTH'
        binWidth:
          type: number
          format: double
      required:
        - id
        - name
        - table
        - type
        - dimensionId
        - binType
        - binWidth
      type: object
      additionalProperties: true
    CustomRangeBinDimension:
      properties:
        id:
          type: string
          description: Unique identifier for the custom dimension
        name:
          type: string
          description: Display name for the custom dimension
        table:
          type: string
          description: Table this custom dimension belongs to
        type:
          $ref: '#/components/schemas/CustomDimensionType.BIN'
          description: Type of custom dimension (bin or sql)
        dimensionId:
          $ref: '#/components/schemas/FieldId'
          description: Field ID of the parent dimension to bin
        binType:
          $ref: '#/components/schemas/BinType.CUSTOM_RANGE'
        customRange:
          items:
            $ref: '#/components/schemas/BinRange'
          type: array
      required:
        - id
        - name
        - table
        - type
        - dimensionId
        - binType
        - customRange
      type: object
      additionalProperties: true
    CustomGroupBinDimension:
      properties:
        id:
          type: string
          description: Unique identifier for the custom dimension
        name:
          type: string
          description: Display name for the custom dimension
        table:
          type: string
          description: Table this custom dimension belongs to
        type:
          $ref: '#/components/schemas/CustomDimensionType.BIN'
          description: Type of custom dimension (bin or sql)
        dimensionId:
          $ref: '#/components/schemas/FieldId'
          description: Field ID of the parent dimension to bin
        binType:
          $ref: '#/components/schemas/BinType.CUSTOM_GROUP'
        customGroups:
          items:
            $ref: '#/components/schemas/BinGroup'
          type: array
      required:
        - id
        - name
        - table
        - type
        - dimensionId
        - binType
        - customGroups
      type: object
      additionalProperties: true
    CustomDimensionType.SQL:
      enum:
        - sql
      type: string
    DimensionType:
      enum:
        - string
        - number
        - timestamp
        - date
        - boolean
      type: string
    Compact:
      enum:
        - auto
        - thousands
        - millions
        - billions
        - trillions
        - kilobytes
        - megabytes
        - gigabytes
        - terabytes
        - petabytes
        - kibibytes
        - mebibytes
        - gibibytes
        - tebibytes
        - pebibytes
      type: string
    FilterOperator:
      enum:
        - isNull
        - notNull
        - equals
        - notEquals
        - startsWith
        - endsWith
        - include
        - doesNotInclude
        - lessThan
        - lessThanOrEqual
        - greaterThan
        - greaterThanOrEqual
        - inThePast
        - notInThePast
        - inTheNext
        - inTheCurrent
        - notInTheCurrent
        - inBetween
        - notInBetween
        - inPeriodToDate
      type: string
    CustomFormatType:
      enum:
        - default
        - percent
        - currency
        - number
        - id
        - date
        - timestamp
        - bytes_si
        - bytes_iec
        - custom
      type: string
    TableCalculationBase:
      properties:
        totalMode:
          $ref: '#/components/schemas/TableCalculationTotalMode'
          description: How column totals are computed for this calculation
        type:
          $ref: '#/components/schemas/TableCalculationType'
          description: Data type of the calculation result
        format:
          $ref: '#/components/schemas/CustomFormat'
          description: Formatting options for the calculation
        displayName:
          type: string
          description: Display name shown in the UI
        name:
          type: string
          description: Internal name of the table calculation
        index:
          type: number
          format: double
          description: Display order index
      required:
        - displayName
        - name
      type: object
    TableCalculationTemplate:
      anyOf:
        - properties:
            partitionBy:
              items:
                type: string
              type: array
            orderBy:
              items:
                properties:
                  order:
                    type: string
                    enum:
                      - asc
                      - desc
                      - null
                    nullable: true
                  fieldId:
                    type: string
                required:
                  - order
                  - fieldId
                type: object
              type: array
              description: Fields to order by for window functions
            fieldId:
              type: string
              description: Field ID to apply the template to
            type:
              $ref: >-
                #/components/schemas/TableCalculationTemplateType.PERCENT_CHANGE_FROM_PREVIOUS
              description: Type of template calculation
          required:
            - orderBy
            - fieldId
            - type
          type: object
        - properties:
            partitionBy:
              items:
                type: string
              type: array
            orderBy:
              items:
                properties:
                  order:
                    type: string
                    enum:
                      - asc
                      - desc
                      - null
                    nullable: true
                  fieldId:
                    type: string
                required:
                  - order
                  - fieldId
                type: object
              type: array
              description: Fields to order by for window functions
            fieldId:
              type: string
              description: Field ID to apply the template to
            type:
              $ref: >-
                #/components/schemas/TableCalculationTemplateType.PERCENT_OF_PREVIOUS_VALUE
              description: Type of template calculation
          required:
            - orderBy
            - fieldId
            - type
          type: object
        - properties:
            partitionBy:
              items:
                type: string
              type: array
              description: Fields to partition by
            fieldId:
              type: string
              description: Field ID to apply the template to
            type:
              $ref: >-
                #/components/schemas/TableCalculationTemplateType.PERCENT_OF_COLUMN_TOTAL
              description: Type of template calculation
          required:
            - fieldId
            - type
          type: object
        - properties:
            fieldId:
              type: string
              description: Field ID to apply the template to
            type:
              $ref: '#/components/schemas/TableCalculationTemplateType.RANK_IN_COLUMN'
              description: Type of template calculation
          required:
            - fieldId
            - type
          type: object
        - properties:
            fieldId:
              type: string
              description: Field ID to apply the template to
            type:
              $ref: '#/components/schemas/TableCalculationTemplateType.RUNNING_TOTAL'
              description: Type of template calculation
          required:
            - fieldId
            - type
          type: object
        - properties:
            frame:
              $ref: '#/components/schemas/FrameClause'
              description: Frame clause for window functions
            partitionBy:
              items:
                type: string
              type: array
              description: Fields to partition by for window functions
            orderBy:
              items:
                properties:
                  order:
                    type: string
                    enum:
                      - asc
                      - desc
                      - null
                    nullable: true
                  fieldId:
                    type: string
                required:
                  - order
                  - fieldId
                type: object
              type: array
              description: Fields to order by for window functions
            fieldId:
              type: string
              nullable: true
              description: Field ID to apply the template to
            windowFunction:
              $ref: '#/components/schemas/WindowFunctionType'
              description: Window function type
            type:
              $ref: >-
                #/components/schemas/TableCalculationTemplateType.WINDOW_FUNCTION
              description: Type of template calculation
          required:
            - partitionBy
            - orderBy
            - fieldId
            - windowFunction
            - type
          type: object
    OrFilterGroup:
      properties:
        or:
          items:
            $ref: '#/components/schemas/FilterGroupItem'
          type: array
          description: Array of filters or nested groups combined with OR logic
        id:
          type: string
          description: Unique identifier for the filter group
      required:
        - or
        - id
      type: object
    Record_string.ParameterValue_:
      properties: {}
      additionalProperties:
        $ref: '#/components/schemas/ParameterValue'
      type: object
      description: Construct a type with a set of properties K of type T
    FilterRule_FilterOperator.DashboardFieldTarget.AnyType.AnyType_:
      properties:
        includeNull:
          type: boolean
          description: >-
            For the `equals` operator on string fields, also match rows where
            the

            field is null (compiles to `field IN (...) OR field IS NULL`). Lets
            users

            combine null with selected values in a single "is" rule.
        values:
          items:
            $ref: '#/components/schemas/AnyType'
          type: array
          description: Values to filter by
        operator:
          $ref: '#/components/schemas/FilterOperator'
          description: Filter operator
        id:
          type: string
          description: Unique identifier for the filter
        target:
          $ref: '#/components/schemas/DashboardFieldTarget'
          description: Target field for the filter
        settings:
          $ref: '#/components/schemas/AnyType'
          description: Additional settings for date/time filters
        disabled:
          type: boolean
          description: Whether this filter is disabled
        required:
          type: boolean
          description: Whether this filter is required
        caseSensitive:
          type: boolean
          description: >-
            Overrides the field/explore case-sensitivity for this rule only.

            Used by internal features like autocomplete search that must always

            match case-insensitively regardless of the field's configured
            setting.
      required:
        - operator
        - id
        - target
      type: object
      additionalProperties: true
    DashboardTileTargets:
      properties: {}
      additionalProperties:
        $ref: '#/components/schemas/DashboardTileTarget'
      type: object
      description: >-
        Deliberately an index-signature literal, not `Record<string, ...>`. When

        TSOA first resolves `Record<string, DashboardTileTarget>` inside a
        mapped

        type (e.g. `Omit<DashboardFilterRule, 'id'>` in content-as-code types),
        it

        caches an EMPTY model under the shared
        `Record_string.DashboardTileTarget_`

        name, and request validation then strips every tileTargets entry from

        bodies — silently breaking dashboard filters on SQL chart tiles. The

        index-signature form resolves correctly in every context.
    VizAggregationOptions:
      enum:
        - sum
        - count
        - avg
        - min
        - max
        - any
      type: string
    VizSortBy:
      properties:
        pivotValues:
          items:
            $ref: '#/components/schemas/PivotSortAnchor'
          type: array
          description: Pins the row-sort anchor to a specific pivot column.
        nullsFirst:
          type: boolean
        direction:
          $ref: '#/components/schemas/SortByDirection'
        reference:
          type: string
      required:
        - direction
        - reference
      type: object
    VizIndexType:
      enum:
        - time
        - category
      type: string
    Pick_CompiledDimension.name-or-label-or-table_:
      properties: {}
      type: object
      description: From T, pick a set of properties whose keys are in the union K
    Record_string.FieldId_:
      properties: {}
      additionalProperties:
        type: string
      type: object
      description: Construct a type with a set of properties K of type T
    FilterRule:
      properties:
        includeNull:
          type: boolean
          description: >-
            For the `equals` operator on string fields, also match rows where
            the

            field is null (compiles to `field IN (...) OR field IS NULL`). Lets
            users

            combine null with selected values in a single "is" rule.
        values:
          items:
            $ref: '#/components/schemas/AnyType'
          type: array
          description: Values to filter by
        operator:
          $ref: '#/components/schemas/FilterOperator'
          description: Filter operator
        id:
          type: string
          description: Unique identifier for the filter
        target:
          $ref: '#/components/schemas/FieldTarget'
          description: Target field for the filter
        settings:
          $ref: '#/components/schemas/AnyType'
          description: Additional settings for date/time filters
        disabled:
          type: boolean
          description: Whether this filter is disabled
        required:
          type: boolean
          description: Whether this filter is required
        caseSensitive:
          type: boolean
          description: >-
            Overrides the field/explore case-sensitivity for this rule only.

            Used by internal features like autocomplete search that must always

            match case-insensitively regardless of the field's configured
            setting.
      required:
        - operator
        - id
        - target
      type: object
      additionalProperties: true
    CustomDimensionType.BIN:
      enum:
        - bin
      type: string
    BinType.FIXED_NUMBER:
      enum:
        - fixed_number
      type: string
    BinType.FIXED_WIDTH:
      enum:
        - fixed_width
      type: string
    BinType.CUSTOM_RANGE:
      enum:
        - custom_range
      type: string
    BinRange:
      properties:
        to:
          type: number
          format: double
          description: End value for this bin range (undefined for the last range)
        from:
          type: number
          format: double
          description: Start value for this bin range (undefined for the first range)
      type: object
    BinType.CUSTOM_GROUP:
      enum:
        - custom_group
      type: string
    BinGroup:
      properties:
        values:
          items:
            $ref: '#/components/schemas/GroupValueRule'
          type: array
          description: Rules that match values into this group
        name:
          type: string
          description: Display name for this group (e.g. "North America")
      required:
        - values
        - name
      type: object
    TableCalculationTotalMode:
      enum:
        - formula
        - sum_of_rows
        - none
      type: string
    TableCalculationType:
      enum:
        - number
        - string
        - date
        - timestamp
        - boolean
      type: string
    TableCalculationTemplateType.PERCENT_CHANGE_FROM_PREVIOUS:
      enum:
        - percent_change_from_previous
      type: string
    TableCalculationTemplateType.PERCENT_OF_PREVIOUS_VALUE:
      enum:
        - percent_of_previous_value
      type: string
    TableCalculationTemplateType.PERCENT_OF_COLUMN_TOTAL:
      enum:
        - percent_of_column_total
      type: string
    TableCalculationTemplateType.RANK_IN_COLUMN:
      enum:
        - rank_in_column
      type: string
    TableCalculationTemplateType.RUNNING_TOTAL:
      enum:
        - running_total
      type: string
    FrameClause:
      properties:
        end:
          $ref: '#/components/schemas/FrameBoundary'
          description: End boundary of the frame
        start:
          $ref: '#/components/schemas/FrameBoundary'
          description: Start boundary of the frame
        frameType:
          $ref: '#/components/schemas/FrameType'
          description: Type of frame (ROWS or RANGE)
      required:
        - end
        - frameType
      type: object
    WindowFunctionType:
      enum:
        - row_number
        - percent_rank
        - cume_dist
        - rank
        - sum
        - avg
        - count
        - min
        - max
      type: string
    TableCalculationTemplateType.WINDOW_FUNCTION:
      enum:
        - window_function
      type: string
    ParameterValue:
      anyOf:
        - type: string
        - type: number
          format: double
        - items:
            type: string
          type: array
        - items:
            type: number
            format: double
          type: array
    DashboardFieldTarget:
      properties:
        fallbackType:
          $ref: '#/components/schemas/DimensionType'
        isSqlColumn:
          type: boolean
        tableName:
          type: string
        fieldId:
          type: string
      required:
        - tableName
        - fieldId
      type: object
    DashboardTileTarget:
      anyOf:
        - $ref: '#/components/schemas/DashboardFieldTarget'
        - type: boolean
          enum:
            - false
    SortByDirection:
      enum:
        - ASC
        - DESC
      type: string
    FieldTarget:
      properties:
        fieldId:
          type: string
          description: Field ID to filter on
      required:
        - fieldId
      type: object
    GroupValueRule:
      properties:
        value:
          type: string
        matchType:
          $ref: '#/components/schemas/GroupValueMatchType'
      required:
        - value
        - matchType
      type: object
    FrameBoundary:
      properties:
        offset:
          type: number
          format: double
          description: Offset for PRECEDING/FOLLOWING
        type:
          $ref: '#/components/schemas/FrameBoundaryType'
          description: Boundary type
      required:
        - type
      type: object
    FrameType:
      enum:
        - rows
        - range
      type: string
    GroupValueMatchType:
      enum:
        - exact
        - startsWith
        - endsWith
        - includes
      type: string
    FrameBoundaryType:
      enum:
        - unbounded_preceding
        - preceding
        - current_row
        - following
        - unbounded_following
      type: string

````