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

# Disable Statistics Configuration

> Disable the statistics configuration. Statistics will no longer be computed.



## OpenAPI

````yaml https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /datasets/{dataset_id}/statistics-configuration
openapi: 3.1.1
info:
  contact:
    email: support@narrative.io
    name: Narrative Support
    url: https://www.narrative.io
  termsOfService: https://www.narrative.io/legal/terms-of-service
  x-logo:
    url: >-
      https://cdn.narrative.io/images/company-logos/prod/narrative-logo-text-white.svg
    backgroundColor: rgb(9, 34, 166)
    altText: Narrative Logo
  description: >-
    The [Narrative Data Collaboration Platform](https://app.narrative.io) API is
    organized around REST. Our API has predictable resource-oriented URLs,
    accepts form-encoded request bodies, returns JSON-encoded responses, and
    uses standard HTTP response codes, authentication, and verbs.



    The current version is a pre-release beta.  It may result in unexpected
    behavior and there may be breaking changes in future releases up to the 1.0
    release.
  title: Narrative Data Collaboration Platform API
  version: 2.4.x
servers:
  - url: https://api-dev.narrative.io
  - url: https://api.narrative.io
security: []
tags:
  - name: Access Rules
    description: >-
      Access rules let data providers control who can purchase their data and
      the terms of purchase.


      The `access-rules` API allows you to manage access rules for your
      datasets.


      Related guides:
        - [What is an access rule?](https://kb.narrative.io/access-rules)
  - name: Agent Conversations
    description: >-
      Build LLM-driven workflows that can call MCP tools, ask the caller for
      input, and return structured answers.


      A conversation pins a model, a system prompt, and a tool catalog. Each run
      sends the model a user message (or

      a batch of tool outputs from a previously-paused run); the model decides
      whether to answer directly, call a

      server-side tool (resolved by the platform via Model Context Protocol), or
      call a client-side tool (which pauses

      the run with `requires_action` and waits for the caller to reply).


      Related guides:
        - [Agent Conversations Reference](https://docs.narrative.io/reference/architecture/agent-conversations)
        - [Error catalog](https://docs.narrative.io/reference/architecture/agent-conversations/errors/conversation-not-found)
  - name: MCP Connections
    description: >-
      Connect external (non-Narrative) MCP servers so agent runs can call their
      tools with the

      calling user's own OAuth authorization.


      A connection is created interactively: `POST /mcp-connections` runs OAuth
      discovery and

      Dynamic Client Registration against the server and returns a consent URL;
      the user authorizes

      in a browser; the authorization server redirects to `GET
      /mcp-connections/callback`, which

      finishes the token exchange and marks the connection `connected`. Tokens
      are stored encrypted

      and used server-side — they are never returned by the API. Once connected,
      reference the

      connection by id from an agent run's `mcp_servers[].connection_id`.
  - name: App Invites
    description: >-
      App invites allow applications to create one-time, shareable links on
      behalf of their users. These links

      enable users to invite third parties who do not have a Narrative account
      to perform actions within the

      application.


      For example, a Narrative user can send an invite link to a third party who
      then completes a Pinterest

      OAuth flow and creates a connector profile in the inviter's account,
      allowing the inviter to deliver

      audience data to the third party's Pinterest account without the third
      party needing a Narrative account.


      This API is intended to be used by applications (via app client
      credentials) to create and manage invites

      on behalf of their users, which can then be shared with invitees.
  - name: Apps
    description: >-
      Apps are applications bundled with a UI that can perform various actions
      on behalf of a user utilizing the Narrative API.

      Related guides:
        - [Building a Narrative Native App](https://www.narrative.io/knowledge-base/how-to-guides/building-a-narrative-native-app)
  - name: Access Tokens
    description: API Access Token management
  - name: Attributes
    description: >-
      An attribute models a standardized data point available for sale on the
      Narrative marketplace.


      Narrative automatically turns data points from provider datasets into
      attributes so that buyers can purchase well-formed, standardized data from
      any supplier on the marketplace.
  - name: Auth
    description: >-
      API token is a crucial step for developers to securely authenticate
      requests to the Narrative API

      Related guides:
        - [How to Create an API Token](https://www.narrative.io/knowledge-base/how-to-guides/understanding-narratives-apis/create-an-api-token)
  - name: Authentication
    description: User login and registration
  - name: Billings
    description: Used by Narrative internally to bill customers
  - name: Companies
    description: A collection of employees
  - name: Company Marketing Information
    description: Useful information related to companies
  - name: Compute Pools
    description: >-
      Compute pools represent compute resources (e.g. Snowflake warehouses)
      provisioned within a data plane.

      Companies can manage and share compute pools, assign them to jobs, and set
      a default compute pool on data planes.
  - name: Connections
    description: Associations between connectors and datasets
  - name: Data Shops
    description: |-
      Self-hosted website to sell your data
      Related guides:
        - [Setting up your datashop](https://www.narrative.io/knowledge-base/how-to-guides/shop-builder/settting-up-your-data-shop)
  - name: Data Streams
    description: >-
      The `data-stream` API endpoints allows one to create and update
      data-streams. Additionally the endpoints allow

      finding data-streams using free text search. A few of the endpoints are
      behind authorization.


      Update endpoint allows a client to post an edited data-stream document as
      is, without having to change its shape.

      The API ensures that only certain fields are allowed to be modified.
      Attempts to modify fields not up for client

      modifications are ignored.


      Related guides:
        - [What is a data stream?](https://kb.narrative.io/what-is-a-data-stream)
  - name: Contracts
    description: Contracts related APIs
  - name: Datasets
    description: >-
      Any kind of data, in any schema, can be pushed into the Narrative Data
      Collaboration Platform as a dataset exactly as it is stored in your own
      system.


      The `datasets` API allows you to manage your datasets.
  - name: Destinations
    description: >-
      Destinations associate a subscription to a profile. Optionally, ad-hoc
      quick settings can be configured to a destination.

      Those quick settings have to match the format defined on the app manifest.
  - name: Installations
    description: Installations of Applications for a profile
  - name: Jobs
    description: >-
      Jobs represent an operation done on a given data plane. All jobs today are
      tied to a query that represents a forecast or a materialized view.


      The jobs API provides an interface for interacting with the jobs table,
      which stores various operations involving reading or writing data. This
      API allows users to retrieve detailed information about specific jobs,
      including cost forecasts, data forecasts, NQL forecasts and materialized
      views.
  - name: Mappings
    description: >-
      A mapping is a transformation from a dataset to an attribute. Defining a
      mapping between a dataset and an attribute makes the dataset eligible to
      participate in subscriptions where a buyer is purchasing the target
      attribute.
  - name: Model Inference
    description: Model Inference
  - name: Models
    description: >-
      Machine learning models for training and inference.


      Models can be stored in HuggingFace or Narrative repositories and have
      configurable

      collaborator permissions for training and inference access.


      The `models` API allows you to list, retrieve, and update models
      accessible to your company.
  - name: NQL
    description: >-
      Narrative Query Language (NQL) is a specialized, SQL-inspired language
      designed to query and manipulate data within the Narrative platform. While
      it looks and feels much like standard SQL, it offers extended
      functionality and syntax that let you leverage platform-specific
      features—such as referencing datasets by their IDs, creating materialized
      views, or generating forecasts—without having to manage the complexities
      of different query engines behind the scenes. NQL queries can ultimately
      compile down to multiple underlying engines (e.g., Snowflake, Spark) to
      execute your requests efficiently in the Narrative ecosystem.
  - name: Payment Methods
    description: Payment methods used to purchase data
  - name: Products
    description: Internal routes used to offer datastream as products
  - name: Profiles
    description: >-
      App profiles are associated with an installation. They represent a
      reference to a configuration that the app can use to save confidential
      information outside of Narrative's control.

      Profiles are currently used to configure settings for connector apps.
  - name: Resources
    description: >-
      Narrative gives you access to managed resources, like your own AWS S3
      bucket, so that you can effortlessly buy and sell data on the platform.


      The `resources` API allows you to manage your resources.
  - name: Schema Inference
    description: >-
      The `schema-inference` API analyzes submitted files to automatically infer
      and return their structure as a dataset schema.
  - name: Schema Presets
    description: >-
      The `schema-presets` API allows you to list the available schema presets,
      get detailed information about a specific one and manage its life cycle.


      You can create a schema preset from scratch or create one based on an
      existing one, administrators can create platform wide available (public)
      schema preset.
  - name: Subscriptions
    description: >-
      In the Narrative Data Collaboration Platform a subscription represents a
      set of rules dictating the commercial terms related to the licensing of
      data.


      The `subscriptions` API allows you to set and get information about
      `subscription` objects owned by the authenticated account.
  - name: Uploads
    description: >-
      The `uploads` API allows you to send files to Narrative and use them to
      perform tasks like creating a list or adding data to a dataset.
  - name: Usage
    description: >-
      The `usage` API enables the recording of usage events associated with a
      product.
  - name: Workflows
    description: >-
      The `workflows` API allows you to create, schedule, trigger, and archive
      workflows.

      Workflows are defined using a serverlessworkflow YAML specification.
paths:
  /datasets/{dataset_id}/statistics-configuration:
    delete:
      tags:
        - Dataset Statistics
      summary: Disable Statistics Configuration
      description: >-
        Disable the statistics configuration. Statistics will no longer be
        computed.
      parameters:
        - $ref: '#/components/parameters/parameters_DatasetId-2'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatisticsConfigurationResponse'
      security:
        - BearerAuth: []
components:
  parameters:
    parameters_DatasetId-2:
      in: path
      name: dataset_id
      required: true
      description: Unique identifier for a dataset.
      schema:
        type: integer
  schemas:
    StatisticsConfigurationResponse:
      type: object
      description: >-
        Full statistics configuration entity with metadata. Returned by both PUT
        (create/update) and GET endpoints.
      required:
        - id
        - dataset_id
        - version
        - created_at
        - created_by
        - configuration
      additionalProperties: false
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for this configuration version.
        dataset_id:
          type: integer
          format: int64
          description: The dataset this configuration belongs to.
        version:
          type: integer
          format: int32
          description: Monotonically increasing version number.
        created_at:
          type: string
          format: date-time
          description: Timestamp when this configuration version was created.
        created_by:
          type: integer
          format: int64
          description: User ID of the user who created this configuration version.
        configuration:
          $ref: '#/components/schemas/DatasetStatisticsConfiguration'
          description: The full statistics configuration payload.
    DatasetStatisticsConfiguration:
      type: object
      description: >-
        Configuration payload for computing statistics on dataset fields and
        Rosetta Stone attributes. Supports recursive nesting for arbitrarily
        deep schemas.


        ## Inheritance chain

        defaults → namespace scope → field override → nested node overrides.


        Two distinct inheritance rules apply depending on what is being
        configured:


        ### 1. Stat set (enabled_stats) — all-or-nothing per level

        When a level provides `enabled_stats`, it **completely replaces** the
        parent's stat set. There is no merging: the child's list is the final
        set of stats for that scope. Properties not listed in a parent's
        `properties` array receive **no stats** — they are not inherited from
        any parent level.

        Example: an object field `address` has children `city`, `zip`, and
        `state`. If the field config lists only `city` in `properties`, then
        `zip` and `state` get no stats at all, regardless of what defaults or
        scope say.


        ### 2. Stat options (stat_options) — partial override with per-property
        inheritance

        When a level provides only `stat_options` (without `enabled_stats`), it
        inherits the stat set from its parent and applies option overrides on
        top. Individual option properties follow a granular rule: **only
        explicitly provided option properties are overridden; unspecified
        properties keep the value resolved from the parent level**.

        Example: defaults enable `histogram` with `max_bins: 50, overflow:
        none`. A namespace scope provides `stat_options: { histogram: {
        max_bins: 200 } }` without `enabled_stats`. The resolved scope inherits
        the full stat set from defaults, and the histogram options become
        `max_bins: 200, overflow: none` — `overflow` was not overridden, so the
        parent's value (`none`) is preserved.


        ### Chained stat_options overrides across levels

        Per-property inheritance applies at every level of the chain, and each
        level inherits from its **resolved parent** — not from the original
        defaults. This means overrides accumulate.

        Example — scope overrides `max_bins`, field overrides `overflow`:

        ```json {
          "defaults": {
            "enabled_stats": ["value_count", "histogram"],
            "stat_options": { "histogram": { "max_bins": 50 } }
          },
          "refresh": { "trigger": "manual" },
          "dataset": {
            "scope": {
              "stat_options": { "histogram": { "max_bins": 200 } }
            },
            "fields": [
              {
                "field_name": "price",
                "stat_options": { "histogram": { "overflow": "truncate" } }
              }
            ]
          }
        } ```

        Resolution for `price`:

        1. **defaults** → `histogram(max_bins=50, overflow=none)`

        2. **scope** (stat_options only, inherits defaults) →
        `histogram(max_bins=200, overflow=none)` —
           scope overrides `max_bins` to 200; `overflow` is not specified, so it keeps defaults' `none`.

        3. **price field** (stat_options only, inherits resolved scope) →
        `histogram(max_bins=200, overflow=truncate)` —
           field overrides `overflow` to `truncate`; `max_bins` is not specified, so it keeps scope's `200` (not
           defaults' `50`).

        The key point: `price` gets `max_bins=200` from scope, not `max_bins=50`
        from defaults. Each level inherits from its immediate resolved parent,
        not from the root.

        The same per-property inheritance applies at nested levels (object
        properties, array items). A deeply nested node that provides only
        `stat_options` inherits the stat set and unspecified option properties
        from the effective parent resolved at the namespace level (defaults +
        scope).
      required:
        - defaults
        - refresh
      additionalProperties: false
      properties:
        defaults:
          $ref: '#/components/schemas/StatConfig'
          description: >-
            Global default stat configuration applied to all eligible fields and
            properties. The server automatically filters stats incompatible with
            a field's resolved type and node kind. Note: enabled_stats is
            required for defaults because there is no parent scope to inherit
            from. Providing only stat_options without enabled_stats is invalid
            at this level.
        refresh:
          oneOf:
            - $ref: '#/components/schemas/CronRefresh'
            - $ref: '#/components/schemas/OnUpdateRefresh'
            - $ref: '#/components/schemas/ManualRefresh'
          discriminator:
            propertyName: trigger
          description: >-
            When to recompute statistics. Exactly one trigger type must be
            specified.
        dataset:
          $ref: '#/components/schemas/DatasetFieldNamespace'
          description: >-
            Configuration for dataset schema columns. Use 'scope' to override
            defaults for all dataset fields, or to disable the namespace
            entirely via enabled_stats: []. Use 'fields' for per-field
            overrides.
        rosetta_stone:
          $ref: '#/components/schemas/RosettaStoneFieldNamespace'
          description: >-
            Configuration for Rosetta Stone attributes. Use 'scope' to override
            defaults for all Rosetta Stone fields, or to disable the namespace
            entirely via enabled_stats: []. Use 'fields' for per-field
            overrides.
    StatConfig:
      type: object
      description: >-
        A stat selection with optional per-stat configuration. At least one of
        enabled_stats or stat_options must be provided. An empty enabled_stats
        array explicitly disables all stats for this scope.
        approx_count_distinct and count_distinct are mutually exclusive — the
        server rejects any request that includes both in the same enabled_stats
        array.
      additionalProperties: false
      anyOf:
        - required:
            - enabled_stats
        - required:
            - stat_options
      properties:
        enabled_stats:
          $ref: '#/components/schemas/EnabledStats'
        stat_options:
          $ref: '#/components/schemas/StatOptions'
    CronRefresh:
      type: object
      description: Recompute statistics on a cron schedule. Supported on all data planes.
      required:
        - trigger
        - cron_expression
      additionalProperties: false
      properties:
        trigger:
          type: string
          enum:
            - cron
        cron_expression:
          type: string
          minLength: 1
          description: >-
            A standard 5-field cron expression defining the refresh schedule.
            All times are interpreted in UTC.


            ## Format


            ``` ┌───────────── minute (0–59) │ ┌───────────── hour (0–23) │ │
            ┌───────────── day of month (1–31) │ │ │ ┌───────────── month (1–12)
            │ │ │ │ ┌───────────── day of week (0–7, where 0 and 7 = Sunday) │ │
            │ │ │ * * * * * ```


            ## Supported syntax


            - `*` — every value in the field's range

            - `,` — list separator (e.g. `1,15` for the 1st and 15th)

            - `-` — range (e.g. `1-5` for Monday through Friday)

            - `/` — step (e.g. `*/15` in the minute field = every 15 minutes)

            - `?` — unspecified, allowed in day-of-month and day-of-week

            - `L` — last day, allowed in day-of-month (last day of month) and
            day-of-week (`5L` = last Friday)

            - `W` — nearest weekday, allowed in day-of-month (e.g. `15W` =
            nearest weekday to the 15th)

            - `LW` — last weekday of the month, allowed in day-of-month

            - `#` — nth occurrence, allowed in day-of-week (e.g. `5#3` = third
            Friday)

            - Nicknames: `@yearly`, `@annually`, `@monthly`, `@weekly`,
            `@daily`, `@midnight`, `@hourly`


            ## Day-of-week numbering


            Monday = 1 through Saturday = 6, Sunday = 0 or 7. Both `0` and `7`
            map to Sunday.


            ## Examples


            | Expression        | Meaning                                |
            |-------------------|----------------------------------------| | `0
            0 * * *`       | Every day at midnight UTC              | | `0 3 * *
            1`       | Every Monday at 03:00 UTC              | | `*/15 * * *
            *`    | Every 15 minutes                       | | `0 0 1 * *`      
            | First day of every month at midnight   | | `0 6 * * 1-5`     |
            Weekdays at 06:00 UTC                  | | `0 0 L * ?`       | Last
            day of every month at midnight    | | `0 9 ? * 5#1`     | First
            Friday of every month at 09:00   | | `@daily`          | Equivalent
            to `0 0 * * *`              |
    OnUpdateRefresh:
      type: object
      description: >-
        Recompute statistics whenever dataset data is updated (new snapshot
        ingested, data modified, etc.).
      required:
        - trigger
      additionalProperties: false
      properties:
        trigger:
          type: string
          enum:
            - on_update
    ManualRefresh:
      type: object
      description: Statistics are only computed on demand. No automatic refresh.
      required:
        - trigger
      additionalProperties: false
      properties:
        trigger:
          type: string
          enum:
            - manual
    DatasetFieldNamespace:
      type: object
      description: >-
        Namespace configuration for dataset schema columns. Set
        scope.enabled_stats to [] to disable stats for all dataset fields. At
        least one of scope or fields must be provided.
      additionalProperties: false
      anyOf:
        - required:
            - scope
        - required:
            - fields
      properties:
        scope:
          $ref: '#/components/schemas/StatConfig'
        fields:
          type: array
          description: Per-field overrides for individual dataset columns.
          items:
            $ref: '#/components/schemas/DatasetFieldConfig'
    RosettaStoneFieldNamespace:
      type: object
      description: >-
        Namespace configuration for Rosetta Stone attributes. Set
        scope.enabled_stats to [] to disable stats for all Rosetta Stone fields.
        At least one of scope or fields must be provided.
      additionalProperties: false
      anyOf:
        - required:
            - scope
        - required:
            - fields
      properties:
        scope:
          $ref: '#/components/schemas/StatConfig'
        fields:
          type: array
          description: Per-field overrides for individual Rosetta Stone attributes.
          items:
            $ref: '#/components/schemas/RosettaStoneFieldConfig'
    EnabledStats:
      type: array
      items:
        $ref: '#/components/schemas/StatName'
      uniqueItems: true
      description: >-
        Statistics to compute. An empty array explicitly disables all stats for
        this scope. Server filters type-incompatible stats.
    StatOptions:
      type: object
      description: >-
        Per-stat tuning parameters. Extensible as new stat options are
        introduced.


        ## Histogram options and enabled_stats interaction

        Histogram options (`stat_options.histogram`) require that the
        `histogram` stat is present in the **resolved** stat set. There are
        exactly two valid ways to provide histogram options:

        1. **With enabled_stats that includes `histogram`** — the stat set is
        explicit, and options
           tune the histogram directly.
           Example: `{ "enabled_stats": ["value_count", "histogram"], "stat_options": { "histogram": { "max_bins": 200 } } }`

        2. **Without enabled_stats (stat_options only)** — the stat set is
        inherited from the parent
           level (namespace scope → defaults). The parent's stat set **must** include `histogram`;
           otherwise the server rejects the request with a validation error.
           Example: defaults enable `histogram`. A field provides only
           `{ "stat_options": { "histogram": { "max_bins": 500 } } }` — valid because `histogram`
           is inherited from defaults.

        Providing histogram options when `enabled_stats` is present but does
        **not** include `histogram` is always an error — there is no implicit
        enabling of stats via options.


        ## Per-property inheritance within stat_options

        When stat_options is provided without enabled_stats (at scope, field, or
        nested levels), the stat set is inherited from the parent level and only
        the specified option properties are overridden. Individual option
        properties not explicitly set retain their value from the **resolved
        parent** — not from server defaults. For example, if scope overrides
        `max_bins` to 200 and a field provides only `overflow: truncate`, the
        field gets `max_bins: 200` from scope (not the server default of 50) and
        `overflow: truncate` from its own override.
      additionalProperties: false
      properties:
        histogram:
          $ref: '#/components/schemas/HistogramOptions'
    DatasetFieldConfig:
      allOf:
        - $ref: '#/components/schemas/FieldConfigBase'
        - type: object
          required:
            - field_name
          properties:
            field_name:
              allOf:
                - $ref: '#/components/schemas/IdentifierPattern'
              description: >-
                The column name as defined in the dataset schema. Must be a
                valid identifier (alphanumeric and underscores, max 256 chars).
      unevaluatedProperties: false
    RosettaStoneFieldConfig:
      allOf:
        - $ref: '#/components/schemas/FieldConfigBase'
        - type: object
          required:
            - attribute_name
          properties:
            attribute_name:
              allOf:
                - $ref: '#/components/schemas/IdentifierPattern'
              description: >-
                The Rosetta Stone attribute name (e.g. 'hl7_gender',
                'unique_identifier'). Must be a valid identifier (alphanumeric
                and underscores, max 256 chars).
      unevaluatedProperties: false
    StatName:
      type: string
      enum:
        - value_count
        - null_value_count
        - nan_value_count
        - lower_bound
        - upper_bound
        - approx_count_distinct
        - count_distinct
        - histogram
        - mean
        - standard_deviation
        - completeness
      description: Identifier for a supported statistic.
    HistogramOptions:
      type: object
      additionalProperties: false
      description: >-
        Tuning parameters for the histogram statistic. Each property is
        independently optional and follows per-property inheritance: when a
        child scope provides histogram options, only the properties it
        explicitly sets are overridden. Unspecified properties keep the value
        resolved from the parent level (namespace scope, defaults, or server
        defaults of max_bins=50 and overflow=none).
      properties:
        max_bins:
          type: integer
          minimum: 2
          maximum: 100000
          default: 50
          description: Maximum number of bins in the frequency distribution.
        overflow:
          type: string
          enum:
            - none
            - truncate
          default: none
          description: >-
            Behavior when cardinality exceeds max_bins. 'none' (default): skip
            the histogram entirely. 'truncate': keep the top N-1 bins by
            frequency and roll everything else into an 'Other Values' bin.
    FieldConfigBase:
      type: object
      description: >-
        Common stat configuration shared by dataset and Rosetta Stone field
        configs. Exactly one of three modes must be used (the server rejects
        invalid combinations):


        1. **Primitive field** — provide enabled_stats and/or stat_options at
        the top level.
           Must not include self, properties, or items.

        2. **Non-primitive field** — provide self, properties, and/or items for
        nested structure.
           Must not include enabled_stats or stat_options at this level;
           use self for node-level stat configuration instead.

        3. **No-op / inherit** — omit all stat fields. The field inherits its
        configuration
           from the namespace scope or global defaults.
      additionalProperties: false
      properties:
        enabled_stats:
          $ref: '#/components/schemas/EnabledStats'
        stat_options:
          $ref: '#/components/schemas/StatOptions'
        self:
          $ref: '#/components/schemas/StatConfig'
          description: >-
            Statistics for the non-primitive field node itself (the struct/array
            column). Only `null_value_count` is currently supported — other
            stats are rejected. Use this to count rows where the entire
            container value is NULL.
        properties:
          type: array
          description: >-
            Explicit configurations for named child properties of an object
            field. Only listed children receive stats — unlisted ones are
            skipped entirely.
          minItems: 1
          items:
            $ref: '#/components/schemas/NestedPropertyConfig'
        items:
          $ref: '#/components/schemas/NestedNodeConfig'
          description: Configuration for the array item node.
    IdentifierPattern:
      type: string
      pattern: ^[a-zA-Z0-9_]+$
      maxLength: 256
      description: >-
        A valid identifier: alphanumeric characters and underscores only, max
        256 characters.
    NestedPropertyConfig:
      type: object
      description: >-
        Statistics configuration for a named property of an object node. The
        property may itself be primitive or non-primitive (recursive). A
        property must carry at least one configuration field — there is no
        no-op/inherited variant at the nested level. If a property is listed, it
        must specify what stats to compute. approx_count_distinct and
        count_distinct are mutually exclusive — the server rejects any request
        that includes both in the same enabled_stats array.
      additionalProperties: false
      required:
        - path
      oneOf:
        - description: >-
            Primitive property config. Uses flat enabled_stats/stat_options.
            Must not include self, properties, or items — the server rejects
            such combinations.
          anyOf:
            - required:
                - enabled_stats
            - required:
                - stat_options
        - description: >-
            Non-primitive property config. Uses self, properties, and/or items
            for nested structure. Must not include enabled_stats or stat_options
            at this level — the server rejects such combinations. Use self for
            node-level stat configuration instead.
          anyOf:
            - required:
                - self
            - required:
                - properties
            - required:
                - items
      properties:
        path:
          allOf:
            - $ref: '#/components/schemas/IdentifierPattern'
          description: >-
            Name of the child property relative to the parent object node. Must
            be a valid identifier (alphanumeric and underscores, max 256 chars).
        enabled_stats:
          $ref: '#/components/schemas/EnabledStats'
        stat_options:
          $ref: '#/components/schemas/StatOptions'
        self:
          $ref: '#/components/schemas/StatConfig'
          description: >-
            Statistics for the non-primitive property node itself (the
            struct/array column). Only `null_value_count` is currently supported
            — other stats are rejected. Use this to count rows where the entire
            container value is NULL.
        properties:
          type: array
          description: >-
            Explicit configurations for named child properties of this object
            property. Only listed children receive stats — unlisted ones are
            skipped entirely.
          minItems: 1
          items:
            $ref: '#/components/schemas/NestedPropertyConfig'
        items:
          $ref: '#/components/schemas/NestedNodeConfig'
          description: Configuration for the array item node of this array property.
    NestedNodeConfig:
      type: object
      description: >-
        Recursive statistics configuration for a nested node. Primitive nodes
        use flat enabled_stats/stat_options. Non-primitive nodes use self for
        node-level stats, properties for object children, and items for array
        elements. approx_count_distinct and count_distinct are mutually
        exclusive — the server rejects any request that includes both in the
        same enabled_stats array.
      additionalProperties: false
      oneOf:
        - description: >-
            Primitive node config. Uses flat enabled_stats/stat_options. Must
            not include self, properties, or items — the server rejects such
            combinations.
          anyOf:
            - required:
                - enabled_stats
            - required:
                - stat_options
        - description: >-
            Non-primitive node config. Uses self, properties, and/or items for
            nested structure. Must not include enabled_stats or stat_options at
            this level — the server rejects such combinations. Use self for
            node-level stat configuration instead.
          anyOf:
            - required:
                - self
            - required:
                - properties
            - required:
                - items
      properties:
        enabled_stats:
          $ref: '#/components/schemas/EnabledStats'
        stat_options:
          $ref: '#/components/schemas/StatOptions'
        self:
          $ref: '#/components/schemas/StatConfig'
          description: >-
            Statistics for the non-primitive node itself (the struct/array
            column). Only `null_value_count` is currently supported — other
            stats are rejected. Use this to count rows where the entire
            container value is NULL.
        properties:
          type: array
          description: >-
            Explicit configurations for named child properties of an object
            node. Only properties listed here receive stats — unlisted children
            are skipped entirely (they do NOT inherit from any parent level).
            This is by design: stat selection for struct children is opt-in, not
            opt-out.
          minItems: 1
          items:
            $ref: '#/components/schemas/NestedPropertyConfig'
        items:
          $ref: '#/components/schemas/NestedNodeConfig'
          description: Configuration for the array item node.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````