CertSafari
    Databricks Certified Data Engineer Professional - October 9 onwards· Lessons

    Domain 2 · Lesson 16/45

    OpenSharing: Databricks-to-Databricks and Databricks-to-Open sharing

    Implement OpenSharing (D2D and Databricks-to-Open) and Clean Rooms for privacy-preserving collaboration.

    14 min read
    2.4% of exam
    5 sources
    Published 22 Oct 2026
    Docs as of 17 Oct 2026

    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.

    What the share owner must hold to add each asset type
    Asset added to the sharePrivileges required besides share ownership
    Tables, streaming tables, views, materialized views, metric viewsUSE CATALOG, USE SCHEMA, and SELECT on the asset (kept for as long as it is shared)
    VolumesUSE CATALOG and USE SCHEMA (or catalog/schema ownership), and READ VOLUME on the volume
    Python UDFs and modelsUSE CATALOG and USE SCHEMA (or catalog/schema ownership), and EXECUTE on the object
    Notebook filesCAN READ permission on the notebook
    Creating an empty share in SQL before adding assets to itsql
    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?

    Sources12

    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.

    The two sharing protocols available from a Unity Catalog-enabled workspace
    AspectDatabricks-to-DatabricksDatabricks-to-Open
    Who can receiveUsers on a Unity Catalog-enabled Databricks workspace on another metastoreAny user on any computing platform, such as Apache Spark, pandas or Power BI
    Recipient authenticationNo token; handled by OpenSharing and the Databricks platformLong-lived bearer token, or OIDC federation
    Shareable assetsTables plus views (including dynamic views), notebooks, volumes, modelsTabular data
    GovernanceUnity Catalog governance, auditing and usage tracking on both sidesUnity Catalog governance on the provider side
    Recipient identified byMetastore 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.

    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?

    Sources13

    3.Running a Databricks-to-Databricks share

    A D2D share is set up in four steps, and both sides take part:

    1. The provider creates a share in its metastore and adds tables, views, volumes or notebooks.
    2. 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.
    3. The provider grants the recipient access to the share.
    4. 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?

    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?

    Sources41

    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.

    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?

    Sources24

    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.

    Sources15

    Sources

    (5)

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “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. 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. 3.
      “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. 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. 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

    Continue to part 2 of 2

    Databricks Clean Rooms for privacy-preserving collaboration

    Spotted a mistake, or was something unclear? Tell us.