Lesson 6 of 7 · 40 min · Lab included

Sharing data safely with OpenSharing

In this lesson you will

  • Describe shares, providers and recipients as securable objects
  • Choose between the open route and the Databricks-to-Databricks route
  • Design a minimised gold table for a share
  • Govern shares with ownership, review, audit and an end date
Skip to the knowledge check

Sharing is a decision about control

Sooner or later another organisation needs your data: a supplier, a partner, a regulator, a research group. The old answers are exports, e-mailed files and shared storage keys. Each of them hands over a copy you can no longer see, update or withdraw.

OpenSharing is the Databricks data sharing platform. The current documentation uses that name. Older material, and a lot of existing code and blog posts, call it Delta Sharing. If you read both names, they refer to the same sharing approach, so search for both when you look for examples.

In this lesson we decide when to share, which kind of sharing to use, and how to keep control after the data leaves. We do not cover Marketplace listings or clean rooms in depth.

What it is

The documentation describes OpenSharing as the secure data sharing platform in Databricks for sharing data and AI assets with people outside your organisation, whether or not they use Databricks. It is an open protocol that also underpins Databricks Marketplace and Clean Rooms.

Three concepts carry the model:

ConceptWhat it is
ShareA read-only collection of tables and partitions. For Unity Catalog recipients it can also include views, volumes, models and notebook files. A share is a securable object
ProviderThe party sharing the data. Using the built-in server needs at least one Unity Catalog workspace
RecipientThe party receiving shares. A recipient is also a securable object, and it is defined separately for each metastore

The provider keeps the data where it is. The recipient reads a live view of the shared objects, so there is no copy to e-mail and the provider can change or end the share.

Two ways to share

Databricks-to-openDatabricks-to-Databricks
Who can receiveAnyone, on any compute platformA recipient with a Unity Catalog workspace
How the recipient authenticatesA bearer token or OIDC federationNo token needed
Objects you can shareTables and partitionsMore: notebook files, volumes, models and metric views
How the recipient readsApache Spark, pandas, Power BI and other toolsMounts the share as a catalog in their workspace

Choose by the recipient. A partner who works on another platform needs the open route. A sister company on Databricks gets the richer Databricks-to-Databricks route, where they mount the share as a catalog. Mounting needs the CREATE CATALOG privilege, and accepting an e-mail invitation for a Databricks-to-Databricks share needs the CREATE PROVIDER privilege.

The documentation labels one feature as Beta: OpenSharing by email, which an account admin must enable on the Previews page. It has limits, such as no OIDC federation and no group or service principal recipients. Treat it as a pilot until its status changes.

The sharing steps

In outline: create the share, add the objects, create the recipient, grant the recipient access to the share.

Illustration

sql
-- Schematic outline. Confirm the exact syntax in the current OpenSharing reference.
CREATE SHARE prd_finance_invoices_for_partner;
 
ALTER SHARE prd_finance_invoices_for_partner
  ADD TABLE prd_finance.gold.invoices_shared;     -- a curated table, never raw data
 
CREATE RECIPIENT partner_acme;                    -- open recipient: you send an activation link
 
GRANT SELECT ON SHARE prd_finance_invoices_for_partner TO RECIPIENT partner_acme;

The documentation notes that CREATE RECIPIENT does not support e-mail sharing. Follow the current reference for the exact flow that matches your recipient type.

Share a curated object

The most important design rule: share a purpose-built gold table or view, never your working tables. The recipient sees exactly what is in the share, and nothing else is exposed, so the share is also your privacy control.

  • Create a dedicated schema, for example gold_share, with a table per recipient purpose.
  • Include only the columns the recipient needs. Apply data minimisation: if the partner needs a status and a date, do not share names.
  • Pseudonymise or aggregate when the purpose allows it.
  • Document the purpose, the legal basis or agreement, the owner and the end date for each share.

Row filters, masks and sharing

Lesson 4 listed a limit that matters here: the documentation states that tables with table-level row filters or column masks cannot be shared through OpenSharing. Do not try to share a protected table and rely on the filter. Instead, build a physical, minimised table for the share from a pipeline step that applies the same rules, and share that table. It also gives you a table you can test and version.

Governance of shares

Because shares and recipients are securable objects, the standard governance applies:

  • Ownership by a group. The platform data-sharing group owns shares and recipients.
  • Least privilege on who can share. Creating shares and recipients, and granting them, is a privileged action. Put it behind a group and review it.
  • Review quarterly. List active shares and recipients, owners and last access. End shares nobody uses.
  • Audit. Sharing events appear in the audit logs of lesson 5. Alert on a new recipient and on a new object added to an existing share.
  • Agreements first. Before a share exists, there is an agreement: purpose, permitted use, retention and a contact.

Define shares and recipients in Terraform, like grants, so changes go through a pull request (lesson 7).

Security of the credential

A token-based recipient receives an activation link and a credential file. Treat it like a secret.

  • Send it through a channel the recipient controls, not through a shared mailbox.
  • Set an expiry and rotate it.
  • If a credential leaks, revoke it and issue a new one. The share and the data stay as they are.
  • Prefer OIDC federation over bearer tokens where the recipient's platform supports it.

Regions and residency

Check where the data may go. For EU clients, keep personal data in the agreed region, and confirm that the recipient's reading location is acceptable under the agreement. A live share avoids a copy, which helps, but reading data across a border is still a transfer.

Common mistakes

  • Sharing working tables. Share a curated table.
  • A filter instead of a minimised table. Filters and masks block sharing, and a copy is cleaner anyway.
  • No end date. Shares outlive projects.
  • Leaked credentials by e-mail. Use a controlled channel and an expiry.
  • Sharing before the agreement is signed.

Summary

Use OpenSharing for controlled, live access to curated data. Pick the open route or the Databricks-to-Databricks route by recipient. Share a minimised gold table, govern shares and recipients as securable objects, define them in code and audit them.

Next lesson: the final piece, governance as code with Terraform.

The idea in one picture

From curated table to recipient

  1. Curated gold tableMinimised columns
  2. Share
  3. RecipientOpen or Databricks-to-Databricks
  4. Audit and review
  5. End date

Knowledge check

Answer each question. You see the reason behind every answer at once.

0 of 3 answered

  1. Question 1 of 3Which name does the current Databricks documentation use for the sharing platform?
  2. Question 2 of 3What should you share?
  3. Question 3 of 3How should you treat the status of OpenSharing by email?

Hands-on lab

Goal. Write a sharing design record and a minimisation check for one external partner.

Where to run it

Local Python Run this lab on your own machine with Python 3.10 or newer in a virtual environment.

Python setup guide

Steps

  1. Pick a partner scenario: a transport supplier needs delivery status and date for orders it handles.
  2. Write SHARE.md with purpose, agreement, owner, end date, recipient type and route (open or Databricks-to-Databricks) with a reason.
  3. Create columns.csv listing all columns of the source gold table with a classification (needed, personal, internal).
  4. Write a Python check that fails when the share column list includes any column that is not needed.
  5. Add the review checklist from the lesson as a section: quarterly review, audit alert, credential rotation.

Expected result

A complete design record and a check that passes the minimised column list and fails one with a personal column added.

Go deeper

Official documentation and recommended courses from the providers.

Sources

Last verified 2026-11-11

We check every source against the official documentation. Products change, so confirm details there before you build.