What you will be able to do
- Explain how shares, providers and recipients fit together in Unity Catalog
- Choose between Databricks-to-Databricks and Databricks-to-Open sharing for a given recipient
- Restrict what a recipient sees by sharing a dynamic view instead of a base table
- Share table history so recipients can time travel, stream, and query the change data feed
- Explain how bearer tokens and OIDC federation authenticate open-sharing recipients
Key concept
Share — A share is a read-only Unity Catalog securable that groups the tables, views and other assets a provider exposes. Recipients are then granted access to it. The protocol a recipient uses decides how they authenticate and which asset types the share can deliver to them.
1.Shares, providers and recipients
OpenSharing is the Databricks platform for sharing data and AI assets with users outside your organization, whether or not they use Databricks. It is an open protocol, so the receiving side can be a Databricks workspace, Apache Spark, pandas or Power BI. Databricks Marketplace and Clean Rooms are both built on it, so the objects described here come up again in those features.
Three objects make up every sharing setup. A share is the read-only bundle of assets. A provider is the organization that shares. A recipient is the organization that receives. On a Unity Catalog-enabled workspace the share and the recipient are both securables in the provider's metastore, and on a Databricks recipient's side the provider also shows up as a securable.
Because these are metastore objects, deleting one cuts access straight away. Drop a share and every recipient of that share loses access. Delete a recipient and that recipient loses access to every share it could read. A recipient object also belongs to one metastore. If you share from three metastores to the same partner, you define that partner as a recipient three times.
Building a share takes specific privileges, and some of them have to stay in place for as long as the asset is shared. You need CREATE SHARE on the metastore to create a share, and the share is created from a workspace attached to that metastore. To add an asset you must own the share and hold read rights on the asset itself. If you later lose SELECT on a table you added, recipients stop being able to read it. Databricks recommends making a group the share owner, so one person changing roles doesn't break the share.
| Asset added to the share | Privileges required besides share ownership |
|---|---|
| Tables, streaming tables, views, materialized views, metric views | USE CATALOG, USE SCHEMA, and SELECT on the asset (kept for as long as it is shared) |
| Volumes | USE CATALOG and USE SCHEMA (or catalog/schema ownership), and READ VOLUME on the volume |
| Python UDFs and models | USE CATALOG and USE SCHEMA (or catalog/schema ownership), and EXECUTE on the object |
| Notebook files | CAN READ permission on the notebook |
CREATE SHARE [IF NOT EXISTS] <share-name>
[COMMENT "<comment>"];Checkpoint 1 of 7· Check yourself
An engineer owns a share and added the table sales.orders to it. During a team change, their SELECT privilege on sales.orders is revoked. Nothing else changes. What happens to the share's recipients?
The share owner must keep SELECT on a shared table for as long as it is shared. If they lose it, recipients lose access to that asset, but the share itself stays in place. This is why Databricks recommends a group as share owner.
“If you lose it, the recipient cannot access the asset through the share.”Source: docs.databricks.com
2.Choosing Databricks-to-Databricks or Databricks-to-Open
The recipient decides the protocol. Databricks-to-Databricks (D2D) is for recipients whose workspace is attached to a different Unity Catalog metastore. That metastore can be in another Databricks account and on AWS, Azure or GCP, or it can be a second metastore in your own account. Databricks-to-Open (D2O) is for everyone else. If the recipient doesn't use Databricks, or has no Unity Catalog-enabled workspace, open sharing is the only option. Both protocols use the OpenSharing server built into Databricks. A third route, running the open-source OpenSharing server yourself, is for sharing from platforms other than Databricks.
D2D is the richer protocol because both sides are in Unity Catalog. The recipient needs no token, and the provider has no tokens to manage. Identity verification, authentication and auditing all happen inside the platform. D2D can also deliver assets that open sharing cannot: notebook files, volumes, AI models, and views, including dynamic views that filter rows and mask columns. D2O shares tabular data that any client can read.
| Aspect | Databricks-to-Databricks | Databricks-to-Open |
|---|---|---|
| Who can receive | Users on a Unity Catalog-enabled Databricks workspace on another metastore | Any user on any computing platform, such as Apache Spark, pandas or Power BI |
| Recipient authentication | No token; handled by OpenSharing and the Databricks platform | Long-lived bearer token, or OIDC federation |
| Shareable assets | Tables plus views (including dynamic views), notebooks, volumes, models | Tabular data |
| Governance | Unity Catalog governance, auditing and usage tracking on both sides | Unity Catalog governance on the provider side |
| Recipient identified by | Metastore sharing identifier (or email invitation) | Credential file or IdP policy |
Take a partner with no Databricks workspace who only wants one Delta table in their Power BI reports. That is a D2O case. You create the share and a recipient, and you hand the partner a bearer-token credential or set up OIDC federation. A D2D share doesn't work here because there is no recipient metastore to attach it to. A Clean Room doesn't work either: every participant needs a Unity Catalog-enabled, serverless-enabled workspace with OpenSharing turned on for its metastore, and the partner has none of these. Lakehouse Federation solves a different problem, so it doesn't apply.
Checkpoint 2 of 7· Match them up
Match each sharing scenario to the setup that fits it
Tap a term, then the definition that fits it.
The recipient decides the protocol. D2D is for Unity Catalog workspaces on a different metastore, and it is the only protocol that can deliver views, including dynamic views. D2O is for recipients outside Databricks. Workspaces on the same metastore just use grants. The open-source server is for sharing from platforms other than Databricks.
“Databricks-to-Databricks sharing lets you share data with Databricks users whose workspace is attached to a Unity Catalog metastore that is different from yours.”Source: docs.databricks.com
Checkpoint 3 of 7· Exam question
A partner company has no Databricks workspace at all and only needs continuous read access to a single Delta table through their Power BI reports. Which approach satisfies this requirement with the least operational overhead for the provider?
Correct answer: A — Create a Databricks-to-Open share and hand the partner a bearer token or OIDC federation credential for their BI tool.
- A. Databricks-to-Open sharing is built for recipients on any platform, including tools like Power BI that never touch a Databricks workspace, and it authenticates them with a bearer token or OIDC federation credential issued by the provider. This matches the scenario exactly, since the partner has no Unity Catalog workspace to join.
- B. Databricks-to-Databricks sharing requires the recipient to have a Unity Catalog-enabled Databricks workspace so they can be registered as a recipient inside their own metastore. The partner here has no Databricks presence at all, so this path is not usable.
- C. Lakehouse Federation is designed for querying external databases and catalogs from inside Databricks, not for exposing a Databricks-hosted table to an external BI tool. It solves the opposite direction of data access from what the scenario describes.
- D. Clean rooms are built for joint, privacy-preserving analysis between mutually approving collaborators, not for simply publishing a table for ongoing BI consumption. Adding a BI-only partner as a clean room collaborator would be a mismatched and heavier-weight solution than needed.
3.Running a Databricks-to-Databricks share
A D2D share is set up in four steps, and both sides take part:
- The provider creates a share in its metastore and adds tables, views, volumes or notebooks.
- The provider creates a recipient object. The provider either invites the recipient by email or identifies them by the sharing identifier of the metastore attached to the recipient's workspace.
- The provider grants the recipient access to the share.
- On the recipient side, a metastore admin or another privileged user creates a catalog from the share. From then on it is granted like any other catalog.
There is one exception to "like any other catalog": everything in a catalog created from a share is read-only. The recipient can grant SELECT on a shared table to an analyst group, but no grant lets anyone write to it. Shared notebooks live at the catalog level, so anyone with USE CATALOG on that catalog can open them.
Sharing a dynamic view is how you hide part of a table from a D2D recipient. Suppose a newly acquired subsidiary runs its own Unity Catalog workspace in another region and must not see some business units. You put a dynamic view with a row filter into the share instead of the base table. The open-protocol options can't do this. A bearer token grants read access to whole shared tables and has no notion of rows. OIDC federation only decides who the recipient is; the recipient's identity provider never filters rows. Dynamic views can be shared only with recipients on a Unity Catalog-enabled workspace.
D2D needs no setup between metastores in the same Databricks account, because it is always enabled there. To share with other accounts, or with clients outside Databricks, an account admin or metastore admin first enables OpenSharing on the metastore. D2D works within the same environment type. For example, sharing with Azure Government environments is not supported.
Checkpoint 4 of 7· Check yourself
Your company is sharing a sales table with a newly acquired subsidiary. The subsidiary runs its own Unity Catalog workspace on a different metastore. It must not see rows for two of your business units. Which setup enforces that?
To hide rows, you share a dynamic view. Dynamic views can be shared only with recipients on a Unity Catalog-enabled workspace, which means D2D. A bearer token gives read access to whole shared tables, and OIDC only establishes who the recipient is. Read-only access stops writes, but it doesn't hide any rows.
“If your recipient uses a Unity Catalog-enabled Databricks workspace, you can also include notebook files, views (including dynamic views”Source: docs.databricks.com
Checkpoint 5 of 7· Exam question
Following an acquisition, the newly acquired company runs its own Unity Catalog-enabled Databricks workspace in a different region. The data platform team must grant that company near real-time access to a shared table, but with certain business units hidden from view at the row level. Which approach meets both requirements?
Correct answer: A — Create a Databricks-to-Databricks share and place a dynamic view with a row filter in the share instead of the base table.
- A. Databricks-to-Databricks sharing supports dynamic views, which can carry row filters and column masks, and it delivers near real-time updates because it operates directly through Unity Catalog rather than snapshotting data. This combination is exactly what the acquired company's workspace needs.
- B. A bearer token only controls whether a recipient can connect to a share; it has no mechanism to filter rows within a table. Row-level restriction must be enforced by the shared object itself, such as a dynamic view, not by credential scoping.
- C. Shallow clones cannot be shared through OpenSharing at all, so this table could never be added to a share. Even if it could, a clone does not provide row-level filtering on its own.
- D. OIDC federation is an authentication mechanism that exchanges the recipient's identity provider tokens for access, and it has no role in enforcing row-level restrictions on the data itself. Row filtering has to come from the shared object, not from how the recipient authenticates.
4.Sharing table history and the change data feed
Sharing a table with history lets recipients do more with it than read the current snapshot. They can run time travel queries, read the table as a Spark Structured Streaming source, and run transactions against it. On compute running Databricks Runtime 16.2 and above, WITH HISTORY is the default for new table shares. Every table in a schema shared as a whole is shared with history by default. An existing table share stays as it is until you alter the share.
History sharing also makes D2D shares faster. The table's Delta log is shared too, and recipients read with temporary cloud credentials scoped to the root directory of the shared table. Read performance comes close to direct access to the source table. Partitioned tables are the exception: they don't get this speed-up.
The change data feed has to be set up first. If recipients should query row-level changes with table_changes(), enable CDF on the table before you share it WITH HISTORY. Turning CDF on afterwards is the wrong order. How CDF records updates and deletes is covered in Change Data Feed.
No. WITH HISTORY has no effect on streaming tables, and the DISABLED status is expected. Recipients read streaming tables through serverless compute, which reaches the underlying history it needs anyway.
Checkpoint 6 of 7· Check yourself
A provider shared a Delta table WITH HISTORY to a D2D recipient last quarter. This week the provider turns on the change data feed on that table so the recipient can call table_changes(). How does this setup stand?
For recipients to query row-level changes with table_changes(), CDF must already be enabled on the table when it is shared WITH HISTORY. Enabling it afterwards is the wrong order. The partition limitation only removes the performance benefit of history sharing and has nothing to do with CDF.
“you must enable CDF on the table before you share it WITH HISTORY”Source: docs.databricks.com
5.Authenticating open-sharing recipients
In open sharing, the recipient has no Databricks identity, so the provider sets up authentication when creating the recipient. There are two methods. With a bearer token, Databricks generates a credential file and an activation link. The provider sends the link over a secure channel, and the recipient uses it to download the credential file and then reads the shared data with their own tools. With OIDC federation, there is no long-lived secret to hand over. The recipient's identity provider issues JWTs, and Databricks exchanges them for short-lived Databricks OAuth tokens, following a policy the provider defines.
Bearer tokens are long-lived, so their lifetime needs managing. The provider sets a default recipient token lifetime when enabling OpenSharing on the metastore, and Databricks recommends making tokens expire. Recipients should store the downloaded credential file securely. Providers can also attach IP access lists to a recipient, which limits where the token works from.
D2O can still read straight from the provider's storage. For eligible Delta tables, Databricks returns the table's storage location together with temporary cloud tokens, so the recipient reads directly from cloud storage. This is called directory-based access mode. It is on by default for newly shared assets that qualify. Tables that don't qualify fall back to pre-signed URLs. D2O works between all cloud environment types.
Checkpoint 7 of 7· Match them up
Pair each Databricks-to-Open control with what it does for the provider
Tap a term, then the definition that fits it.
Bearer tokens and OIDC federation are the two ways to authenticate an open-sharing recipient. Only OIDC avoids handing over a long-lived secret. IP access lists add a network restriction on top of either method. Directory-based access mode controls how eligible Delta tables are read, not who the recipient is.
“granting short-lived Databricks OAuth tokens to the recipient in exchange for JWT tokens that the recipient's identity provider (IdP) passes to Databricks.”Source: docs.databricks.com
Sources
(5)
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.https://docs.databricks.com/aws/en/opensharingOfficial docs
“If you remove a share from your Unity Catalog metastore, all recipients of that share lose the ability to access it.”
↩︎ Shares, providers and recipients“you must define the recipient separately for each metastore”
↩︎ Shares, providers and recipients“does not have access to a Databricks workspace that is enabled for Unity Catalog, you must use Databricks-to-Open sharing”
↩︎ Choosing Databricks-to-Databricks or Databricks-to-Open“It supports some OpenSharing features that are not supported in the other protocols, including notebook sharing”
↩︎ Choosing Databricks-to-Databricks or Databricks-to-Open“Databricks-to-Databricks sharing between Unity Catalog metastores in the same account is always enabled.”
↩︎ Running a Databricks-to-Databricks share“granting short-lived Databricks OAuth tokens to the recipient in exchange for JWT tokens”
↩︎ Authenticating open-sharing recipients“Email invitations don't support OIDC federation.”
↩︎ Authenticating open-sharing recipients“a share is a read-only collection of tables and table partitions that a provider wants to share with one or more recipients”
↩︎ Key concept“views (including dynamic views that restrict access at the row and column level)”
↩︎ Exam trap 1“the share recipient doesn't need a token to access the share”
↩︎ Exam trap 2“there is no need to use OpenSharing to share data between workspaces attached to the same Unity Catalog metastore”
↩︎ Prediction“Databricks-to-Databricks sharing lets you share data with Databricks users whose workspace is attached to a Unity Catalog metastore that is different from yours.”
↩︎ Checkpoint“If your recipient uses a Unity Catalog-enabled Databricks workspace, you can also include notebook files, views (including dynamic views”
↩︎ Checkpoint“granting short-lived Databricks OAuth tokens to the recipient in exchange for JWT tokens that the recipient's identity provider (IdP) passes to Databricks.”
↩︎ Checkpoint - 2.
“You must keep that privilege in order for the asset to continue to be shared.”
↩︎ Shares, providers and recipients“Databricks recommends that you use a group as the share owner.”
↩︎ Shares, providers and recipients“Share the table history to allow recipients to perform time travel queries”
↩︎ Sharing table history and the change data feed“you must enable CDF on the table before you share it WITH HISTORY”
↩︎ Exam trap 3“If you lose it, the recipient cannot access the asset through the share.”
↩︎ Checkpoint“you must enable CDF on the table before you share it WITH HISTORY”
↩︎ Checkpoint - 3.https://docs.databricks.com/aws/en/clean-roomsOfficial docs
“A workspace that is enabled for serverless compute.”
↩︎ Choosing Databricks-to-Databricks or Databricks-to-Open“OpenSharing enabled for your Unity Catalog metastore.”
↩︎ Choosing Databricks-to-Databricks or Databricks-to-Open - 4.
“identify them with the sharing identifier of the Unity Catalog metastore”
↩︎ Running a Databricks-to-Databricks share“users can be granted only read access on objects in catalogs that are created from OpenSharing shares”
↩︎ Running a Databricks-to-Databricks share“Sharing with Azure Government environments is not supported.”
↩︎ Running a Databricks-to-Databricks share“When you share a table using compute on Databricks Runtime 16.2 and above, WITH HISTORY is the default.”
↩︎ Sharing table history and the change data feed“Tables with partitioning enabled do not receive the performance benefits of history sharing.”
↩︎ Sharing table history and the change data feed“When you share a streaming table, WITH HISTORY has no effect.”
↩︎ Sharing table history and the change data feed - 5.
“Databricks generates a credential file and an activation link”
↩︎ Authenticating open-sharing recipients“Databricks recommends that you configure tokens to expire.”
↩︎ Authenticating open-sharing recipients“Databricks returns the table's cloud storage location alongside temporary cloud credentials (cloud tokens)”
↩︎ Authenticating open-sharing recipients