The Bronze and Silver pipelines built in earlier chapters land curated tables inside a provider Unity Catalog metastore. The distribution question that follows is structural: how does a finance-domain Silver table reach a partner team that operates either inside a separate Databricks workspace or on a non-Databricks engine, without spinning up an ingestion pipeline at the recipient, without rebuilding access control on a second platform, and without forcing the provider to pre-materialize copies for every consumer.
Delta Sharing answers this question at the protocol level. It is an open REST-based protocol that exposes individual Delta tables (and a curated set of related objects) through a SHARE object in the provider metastore, with recipients identified by RECIPIENT objects and per-share grants issued through standard GRANT statements.
The protocol surfaces two configurations of the same backbone: Databricks-to-Databricks sharing (D2D) and Databricks-to-Open sharing (D2O). In D2D, both sides run Unity Catalog, the recipient is identified by its sharing identifier, and the recipient's metastore mounts the provider's share as a foreign catalog.
Read calls happen over the Delta Sharing REST API but the workspace experience is identical to reading any other Unity Catalog table, including standard GRANT SELECT semantics on the consumer side. In D2O, the recipient is any client that speaks the open Delta Sharing protocol: a pandas notebook, a non-Databricks Spark cluster, Power BI, Tableau, or a custom application that uses the open-source delta-sharing Python or Apache Spark connector.
The recipient is bootstrapped with a JSON activation file (the "profile file") that carries a bearer token, the share endpoint URL, and a token expiration timestamp.
Provider-side objects: SHARE, RECIPIENT, and GRANT
Three Unity Catalog objects compose the provider surface. CREATE SHARE defines a named bundle of objects to be shared; the objects added to a share can be Delta tables, partitions of Delta tables, views, materialized views (subject to source-engine compatibility), volumes, notebook files, and Unity Catalog functions, with table-level inclusion most common in production. CREATE RECIPIENT defines the entity that will be granted access; recipients are typed by their authentication mode at creation time, either DATABRICKS (D2D) or TOKEN (D2O). GRANT SELECT ON SHARE … TO RECIPIENT … ties them together. Only after the grant is issued does the recipient see anything: the share name itself is metadata, and the recipient is an empty inbox until a grant is added.
-- Provider: define a share, add tables, create recipients, grant access
CREATE SHARE finance_share
COMMENT 'Aggregated finance Silver tables for downstream BI and partner consumers';
ALTER SHARE finance_share
ADD TABLE silver_finance.curated.fact_revenue
WITH HISTORY; -- include the table's transaction history for time travel
ALTER SHARE finance_share
ADD TABLE silver_finance.curated.dim_account
PARTITION (region_code = 'EMEA') -- partition-level share for regional scoping
COMMENT 'EMEA partition only - GDPR scoping';
ALTER SHARE finance_share
ADD TABLE silver_finance.curated.fact_orders
AS public.shared_orders -- alias the table for the recipient namespace
WITH CHANGE DATA FEED; -- include CDF so the recipient can stream updates
-- D2D recipient: peer Databricks metastore identified by sharing identifier
CREATE RECIPIENT partner_acme_d2d
USING ID 'aws:us-east-1:5f4c1234-7e89-4a01-9bd2-1234567890ab'
COMMENT 'ACME Analytics Databricks workspace in us-east-1';
-- D2O recipient: open-protocol consumer, token-authenticated
CREATE RECIPIENT external_partner_d2o
COMMENT 'External BI vendor: Tableau Cloud + pandas notebooks';
GRANT SELECT ON SHARE finance_share TO RECIPIENT partner_acme_d2d;
GRANT SELECT ON SHARE finance_share TO RECIPIENT external_partner_d2o;
The recipient type is the structural decision.
A D2D recipient is identified by the consumer's sharing identifier (the metastore_id formatted as <cloud>:<region>:<uuid>); the consumer must surface this identifier in their own metastore through the Share with me UI or through SHOW RECIPIENTS after the provider creates the recipient on its side.
- There is no token to rotate.
- No activation file to email.
- The trust is pinned to the peer metastore's identity.
- The Delta Sharing server enforces it transport-side.
A D2O recipient has no peer metastore identity.
When you create the recipient without an USING ID clause, Unity Catalog generates an activation URL that resolves to a JSON profile file containing the bearer token and the share endpoint.
That URL is single-use by default and the resulting profile file carries an expiration timestamp the provider sets at recipient creation.
Activation file and token lifecycle for D2O
The activation file is the open-protocol entry point.
After the recipient is created the provider runs DESCRIBE RECIPIENT external_partner_d2o to retrieve the activation URL, sends that URL through an out-of-band secure channel (email or partner portal) to the recipient, and the recipient downloads the profile file exactly once.
Subsequent visits to the URL fail by design; this is the protocol's protection against a leaked URL turning into a leaked token.
The downloaded profile is a small JSON document with the four keys consumed by every open-protocol client.
{
"shareCredentialsVersion": 1,
"endpoint": "https://eastus-c2.azuredatabricks.net/api/2.0/delta-sharing/metastores/abcd1234-ee01-4d29-aab5-9876543210ff",
"bearerToken": "dapi8e6c7f4b9a2d1c8f0e1234567890abcdef0123",
"expirationTime": "9999-12-31T23:59:59.000Z"
}
expirationTime is the protocol's only safety net against a stolen profile, and the value above (9999-12-31) means "no expiration", which is the documented default unless the provider explicitly sets a shorter window through ALTER RECIPIENT external_partner_d2o ROTATE TOKEN (EXPIRATION_TIME = INTERVAL '30' DAYS). The other security knob is the IP allowlist on the recipient, which restricts the network ranges the bearer token may be presented from.
-- Rotate the token; the prior token is immediately invalidated
ALTER RECIPIENT external_partner_d2o ROTATE TOKEN (EXPIRATION_TIME = INTERVAL '90' DAYS);
-- Restrict the token to known partner egress IPs only
ALTER RECIPIENT external_partner_d2o
SET PROPERTIES ('ip_access_list.allowed_ip_addresses' = '203.0.113.0/24,198.51.100.45/32');
💡 Exam Trap: The recipient type is decided at
CREATE RECIPIENTtime and cannot be changed. You cannot promote a D2O recipient to D2D or convert a D2D recipient into a token-authenticated open recipient byALTER. The remediation is to drop the recipient (DROP RECIPIENT …), which revokes the existing grants on the share, then create a new recipient with the desired authentication mode and re-issue the grant. Treat the choice as one-way at provisioning time.
💡 Exam Trap:
ALTER SHARE … ADD TABLE … WITH CHANGE DATA FEEDis the only way to make CDF rows visible to recipients. Enablingdelta.enableChangeDataFeedon the source Delta table is necessary but not sufficient: the share itself has to opt the table into CDF, and recipients on Databricks read it throughreadChangeFeedwhile open-protocol clients consume CDF through the dedicatedchange-data-feedendpoint of the delta-sharing client. ForgettingWITH CHANGE DATA FEEDon the share statement results in recipients seeing only the latest snapshot.
📊 Limit: The default token expiration for a D2O recipient is no expiration (
9999-12-31T23:59:59.000Z). Activation URLs are single-use and remain valid for 72 hours after recipient creation if not redeemed; after that the provider must regenerate the URL throughALTER RECIPIENT … ROTATE TOKEN. Rotating a token immediately invalidates the prior bearer token: in-flight queries on the consumer side fail with an authentication error.
Auditing the share through system tables
Both sides of a Delta Sharing relationship are audited through Unity Catalog's audit log surface in system.access.audit.
The provider records every getShare, getTable, and queryTable API call against the share endpoint, including the source IP and the recipient principal name.
The consumer records the corresponding query against the foreign catalog (for D2D) or the open-protocol read (for D2O, in the consumer's own logging stack since they are not on Databricks).
-- Provider-side: who has read the finance_share over the last reporting period
SELECT event_time, user_identity.email AS recipient_principal,
request_params['share'] AS share_name,
request_params['table_full_name'] AS table_name,
source_ip_address, action_name
FROM system.access.audit
WHERE service_name = 'unityCatalog'
AND action_name IN ('deltaSharingQueriedTable', 'deltaSharingGetTableVersion',
'deltaSharingGetTableMetadata', 'deltaSharingListShares')
AND request_params['share'] = 'finance_share'
ORDER BY event_time DESC;
⚠️ Anti-Pattern: Treating Delta Sharing recipients as long-lived service accounts with infinite-expiration tokens and no IP allowlist. The profile file is the entire authentication envelope; once exfiltrated it grants the same access as the recipient until the token is rotated. Production deployments set explicit expiration intervals on creation, scope the recipient with an IP allowlist before issuing the activation URL, and pair audit-log queries with alerts on out-of-allowlist source IPs. Anything less collapses to single-factor token-in-a-file authentication with no revocation signal.
Architectural flow of a D2D and D2O share
The diagram below contrasts the two configurations side by side. D2D wires the recipient's metastore straight to the provider's Delta Sharing server through the peer metastore identity; D2O routes the open-protocol bearer token through the same server but the consumer is any compliant client.
🎯 Scenario: An EMEA-only partner needs read access to
silver_finance.curated.fact_ordersfor ninety days. The provider creates a token-authenticated recipient, sets the expiration on the bearer token to ninety days atROTATE TOKENtime, restricts the IP allowlist to the partner's known egress range, and limits the share to the EMEA partition throughADD TABLE … PARTITION (region_code = 'EMEA'). After the ninety-day window the token expires automatically without any further provider action; the partner's last successful read is recorded insystem.access.audit, and the recipient object remains for audit traceability even though further reads fail.
Decision Anchor: D2D versus D2O
Choose D2D when the recipient operates a Unity Catalog metastore and the use case benefits from native catalog integration:
- cross-workspace BI dashboards
- partner Databricks clusters running PySpark
- downstream pipelines that read the shared tables through
spark.read.table('<foreign_catalog>.<schema>.<table>')
The integration replays the provider's grants as foreign catalog grants and audit signals flow into the recipient's own system.access.audit.
Choose D2O when the recipient does not run Databricks:
- BI tools that speak Delta Sharing natively (Power BI, Tableau)
- pandas notebooks at academic or commercial partners
- custom applications that wrap the
delta-sharingPython client - non-Databricks Spark clusters that import the
io.delta:delta-sharing-sparkconnector
The token-and-profile-file envelope is the cost of supporting any compliant client; the operational expectation is explicit token rotation cadence and IP allowlisting at recipient creation, not as a follow-up.
💡 Exam Trap: D2D does NOT require token rotation. The peer metastore identity is the credential, and rotating tokens has no meaning when no token exists. A question that asserts "the D2D recipient must rotate its bearer token every ninety days" is wrong; the rotation discipline is exclusively a D2O concern.
⚠️ Anti-Pattern: Re-creating a share to add a single table rather than running
ALTER SHARE … ADD TABLE …. The grant on the share is what activates recipient access; recreating the share invalidates all existing grants and forces the provider to re-issue them, which is an operational mistake mistaken for hygiene.ALTER SHAREis the correct verb for incremental table addition or removal.
