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

# Start a Databricks Metric View publication preview

Queues an offline conversion of static YAML from the deployment's latest successful build and returns polling URLs immediately. Exact retries while the same content-addressed preview is running reuse that work; a later submission starts a fresh execution. Preview payloads and results are retained for at most seven days. The conversion supports scalar dimensions, common and calculated measures, and acyclic many-to-one equi-joins from one Databricks datasource. Access policies, templating, extends, unsafe fanout, unsupported expressions, multiple datasources, and converter loss are blocked per view. Two-part schema.table sources are qualified with `CUBEJS_DB_DATABRICKS_CATALOG` for the selected datasource; without that setting they fail closed with an actionable issue. Requires `SchemaRead` or `SchemaUpdate` access. This is currently in preview — reach out to the Cube support team to activate it for your account.


## OpenAPI

````yaml /api-reference/api.yaml post /api/v1/deployments/{deploymentId}/databricks-metric-view-previews
openapi: 3.1.0
info:
  title: Cube Platform API
  version: 1.0.0
  description: >-
    Programmatically manage Cube: deployments and everything scoped to them

    (environments, folders, reports, workbooks, notifications, workspace, and
    agents),

    plus account-level users, groups, policies, embedding, and AI settings.
    Data-model

    authoring, dev mode, branches, and uploads live under /build/api/v1 — same
    host and

    token, routed to the build pods.
servers:
  - url: https://{tenant}.cubecloud.dev
    description: Your tenant host. Replace the whole host if you use a custom domain.
    variables:
      tenant:
        default: your-tenant
        description: Your Cube tenant subdomain
security:
  - bearerAuth: []
tags:
  - name: Deployments
  - name: Deployment Creation
  - name: Environments
  - name: Env Variables
  - name: Regions
  - name: Data Model
  - name: Data Model Uploads
  - name: GitHub
  - name: GitHub Connection
  - name: dbt Sync
  - name: Databricks Metric View Publication
  - name: Databricks Metric View Integration
  - name: Folders
  - name: Reports
  - name: Workbooks
  - name: Dashboard Exports
  - name: Notifications
  - name: Workspace
  - name: Users
  - name: Users Admin
  - name: User Attributes
  - name: User Attribute Values
  - name: Tenant Settings
  - name: OAuth Integrations
  - name: User OAuth Tokens
  - name: OIDC Token Configs
  - name: App Theme
  - name: Embed
  - name: Embed Tenants
  - name: Dashboard Embed Access
  - name: Usage Analytics
  - name: OpenAPI Spec
paths:
  /api/v1/deployments/{deploymentId}/databricks-metric-view-previews:
    post:
      tags:
        - Databricks Metric View Publication
      summary: Start a Databricks Metric View publication preview
      operationId: startPreview
      parameters:
        - in: path
          name: deploymentId
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatabricksMetricViewPublicationPreviewInput'
        description: DatabricksMetricViewPublicationPreviewInput
        required: true
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/DatabricksMetricViewPublicationPreviewStartResponse
          description: ''
components:
  schemas:
    DatabricksMetricViewPublicationPreviewInput:
      properties:
        dataSourceName:
          type: string
        selectionMode:
          $ref: >-
            #/components/schemas/DatabricksMetricViewPublicationPreviewInputSelectionMode
        sourceOverrides:
          oneOf:
            - type: object
              additionalProperties:
                type: string
            - type: 'null'
          description: >-
            Optional map of Cube view name to the root source dataset the view
            projects from, for view projections where that root would otherwise
            be ambiguous.
        targetNames:
          oneOf:
            - type: object
              additionalProperties:
                type: string
            - type: 'null'
          description: Optional Cube view name to Databricks Metric View name overrides.
        viewNameRegex:
          oneOf:
            - type: string
            - type: 'null'
          description: >-
            A safe, bounded regex subset for view names. Supports literals, ^,
            $, dot, and one .* wildcard; grouping, alternation, lookaround, and
            backreferences are rejected.
        viewNames:
          oneOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: Required only when selectionMode is 'selected'.
      required:
        - dataSourceName
        - selectionMode
      type: object
    DatabricksMetricViewPublicationPreviewStartResponse:
      properties:
        buildJobId:
          type: integer
        commit:
          oneOf:
            - type: string
            - type: 'null'
        dataSourceName:
          type: string
        deploymentId:
          type: integer
        previewId:
          type: string
        resultUrl:
          type: string
        reused:
          type: boolean
        status:
          $ref: >-
            #/components/schemas/DatabricksMetricViewPublicationPreviewStartResponseStatus
        statusUrl:
          type: string
      required:
        - previewId
        - deploymentId
        - dataSourceName
        - buildJobId
        - reused
        - status
        - statusUrl
        - resultUrl
      type: object
    DatabricksMetricViewPublicationPreviewInputSelectionMode:
      enum:
        - all
        - selected
        - pattern
      type: string
    DatabricksMetricViewPublicationPreviewStartResponseStatus:
      enum:
        - QUEUED
      type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Token authentication. Send `Authorization: Bearer <YOUR_TOKEN>`.'

````