Sub topic 4
Providers and recipients
This chapter assumes you know what Delta Sharing is, that Delta tables are the shared source, and that clients talk to a sharing server over HTTPS with bearer tokens. Here we cover the two roles every sharing setup has, what each one controls, and the mistakes people make when they mix the roles up.
The two roles
Delta Sharing has two parties.
- A provider is the organisation that owns the data. It holds the Delta tables, decides what to share, and decides who may read it.
- A recipient is the party that receives access. It reads the shared tables but does not own them and cannot change them.
The roles belong to a relationship, not to an organisation. One company can be a provider to its partners and a recipient of another company's data at the same time.
What each role controls
| Concern | Provider | Recipient |
|---|---|---|
| Data storage | Owns the Delta tables and the cloud storage that holds them | Stores nothing unless it chooses to copy results |
| Access decisions | Creates shares and grants access | Can only read what it was granted |
| Credentials | Issues the token or identity for each recipient | Keeps the credential safe and presents it on each request |
| Compute | Runs the sharing server | Runs its own queries with pandas, Spark or another connector |
| Writes | Can update its tables at any time | Read-only |
The last two rows matter for cost and design. The recipient brings its own compute, so a heavy query on the recipient side does not slow the provider's own workloads. The recipient is also read-only, so it cannot corrupt the source.
How the roles interact
The provider runs a sharing server. The recipient's client sends authenticated requests to that server, and the server checks them against the provider's grants.
Two steps happen outside the protocol's data path. The provider must deliver the credential to the recipient through a safe channel. The recipient must then store it securely. A later chapter covers the profile file format. For now, treat the credential as the proof of identity for one recipient.
One recipient per party
Create a separate recipient for each organisation, and for each distinct use within one organisation if their needs differ. This gives you three benefits:
- You can revoke one party without affecting the others.
- Audit logs show who read what.
- You can grant each party a different set of shares.
Reusing one credential for several partners removes all three. If that credential leaks, you must rotate it for everyone.
Granting and limiting access
A provider grants access to a share, not to the underlying storage. The recipient never receives cloud storage keys. It gets short-lived file URLs only for the tables in shares it was granted.
On Databricks with Unity Catalog, the provider-side steps look like this:
CREATE SHARE retail_share;
ALTER SHARE retail_share ADD TABLE main.sales.orders;
CREATE RECIPIENT partner_co;
GRANT SELECT ON SHARE retail_share TO RECIPIENT partner_co;The recipient partner_co can now read main.sales.orders through retail_share, and nothing else. Later chapters show how a recipient reads the data and how the open-source server defines the same relationships in a YAML file.
Common errors
- Treating the recipient as a copy owner. A recipient reads live data. If the provider changes or removes a table, the recipient sees that change. Recipients who need a stable snapshot must save their own copy.
- Sharing one token widely. See above. Prefer one recipient per party.
- Assuming the recipient can write back. The protocol is read-only. A recipient who needs to return data must use a separate channel, or become a provider in a second sharing relationship.
- Sending credentials by plain email or chat. Anyone holding the token can read the shared data until it expires or is revoked.
- Forgetting that recipients bring their own compute. The provider is not billed for the recipient's queries, but may still pay for storage reads and data transfer. Cost is covered in a later chapter.
Exercise
A provider shares the same table with three partner companies using one bearer token. One partner leaves the contract. Why is this setup a problem, and what should the provider have done instead?
Show answer
Revoking or rotating the single token cuts off all three partners, and the audit log cannot show which partner read the data. The provider should have created one recipient per partner, each with its own credential and grant, so it can revoke the departing partner alone and attribute reads correctly.