Before you start
- Configure a Databricks data source and deploy static Cube YAML with public views. This workflow reads the latest successful deployed build, not unsaved IDE changes.
- If a Cube source uses a two-part
schema.tablename, setCUBEJS_DB_DATABRICKS_CATALOGfor that data source so Preview can resolve its catalog. Without it, those views are blocked. - Ask your Databricks administrator for a dedicated target catalog and schema for the
published Metric Views.
The identity configured on the Cube data source needs
CAN USEon its SQL warehouse,USE CATALOGandUSE SCHEMAon the target and source namespaces,SELECTon source relations, andCREATE TABLEon the target schema. The same identity must own any existing Cube-managed Metric View it needs to update. It owns the temporary views it creates for the access test. See the Databricks Metric View prerequisites and Metric View ownership guidance (AWS documentation; use the equivalent pages for Azure or Google Cloud). - Arrange target access for Databricks consumers separately. Publishing an object does not
grant them
SELECTon it or access to its catalog and schema. - Databricks evaluates access to the published object under Unity Catalog permissions, not Cube’s query-time authorization. A view with a Cube access policy, or one that references a cube with an access policy, is blocked from publication; Cube access policies are never transferred to Databricks. Review the Preview result and configure Databricks grants before exposing a target to consumers.
- Cube uses the data source credential server-side; you do not enter a second token in the browser. Preview returns generated YAML to authorized users for review.
Publish a view
The full publication flow requiresSchemaUpdate
deployment access. SchemaRead is enough to run and
inspect Preview, but not to save settings, test access, or sync.
1
Configure publication
Open your deployment’s Settings → Data Sources and edit the Databricks data source.
Expand Databricks Metric Views. Enter the target catalog and schema. Choose all public
views, selected views, or a name pattern; optionally add a target-name prefix. Turn publication
on and save. This alone does not start a write.
2
Preview the deployed model
Run Preview. Inspect every view’s generated YAML, source relation, warnings, and blocking
issues. It reads the deployed model and does not write to Databricks. Preview payloads and
results are retained for at most seven days; run it again if an older result is gone.
3
Test access
With a completed preview selected, run Test access. It checks source reads as well as
warehouse, target-schema, and temporary create/replace/drop access. The test creates and
cleans up a uniquely named temporary view; it does not change a final target.
4
Publish and inspect each result
Select Sync now. Review the result for each view in run history. Created,
Updated, and Unchanged are successful outcomes; Blocked, Rejected by Databricks,
and Write failed need investigation. A run can be Partial if some views succeeded and
others did not.
- The name pattern supports literals,
^,$, a bare.that matches any single character, and at most one.*wildcard. It is not a general regular expression and is limited to 128 characters. Review the matched views in Preview before syncing. - Each preview or sync resolves at most 128 views per data source, whether the scope is all, selected, or pattern. If all or pattern resolves more, preview and sync reject the request; narrow the scope and try again.
- A newly deployed view enters an all or matching pattern scope on the next manual sync. A selected scope changes only when you edit it.
- Renaming a view or target creates a new target and leaves the old one retained.
- Per-view target-name and root-source overrides are available through the configuration API, but are not editable in the card.
deletionPolicy to retain; omitting it also defaults
to retain. The older delete-managed value is deprecated but remains accepted for existing API
clients. It does not delete obsolete Metric Views; it currently behaves like retain.
What can be published
The Preview result is the authority for your deployed model. This preview release supports static YAML, one Databricks data source per published view, scalar dimensions, common aggregates and supported calculated measures, and conservative many-to-one equality joins. The target uses Databricks Metric View YAML 1.1. These categories reflect the current preview release. Capabilities may change between releases, so run a new Preview after a Cube upgrade.- Supported — a static view with a clear root source and representable dimensions, measures, and joins. Review the generated YAML, then test access and sync.
- Warning — behavior-neutral metadata Databricks cannot represent, or a fan-out-unsafe measure
withheld as
CUBE_MEMBER_WITHHELD. Review the exact difference before accepting publication; for a withheld measure, publish it from a view rooted at its own cube.
- Dynamic JavaScript, TypeScript, or Jinja models, or unflattened
extends: use static YAML and flatten inherited definitions before publishing. - A Cube access policy on the view or a referenced cube: keep that governed view in Cube; the policy cannot be transferred to a Databricks Metric View.
- Mixed data sources or an ambiguous root dataset: use one data source and a clear root.
- A two-part
schema.tablesource withoutCUBEJS_DB_DATABRICKS_CATALOG: set that variable for the selected Databricks data source and preview again. - Non-equality, cyclic, or one-to-many joins: simplify the join. For
CUBE_VIEW_JOIN_NOT_REPRESENTABLE, root the view at the many-side cube. - Unsupported expressions or types, or multi-stage, window, or ranking calculations: simplify the model or keep that view in Cube.