Sub topic 1
Why sharing data between organisations is hard
Prerequisites
This chapter assumes you know the following:
- Tables, schemas and basic SQL.
- Basic Python and pandas, or Spark DataFrames.
- What cloud object storage is, such as S3, ADLS or GCS.
- The basics of HTTPS, REST APIs and bearer tokens.
You do not need to know Delta Lake or Delta Sharing yet. Later chapters cover both.
The problem
Sooner or later, another organisation needs your data. It might be a retailer sending sales data to a supplier, or a hospital group sending anonymised results to a research partner. The data is in tables on your side. The partner wants it on theirs, preferably current, and without breaking your security rules.
Two approaches are common, and both scale badly.
Approach 1: copy files
You export tables to CSV or Parquet and deliver them by SFTP, email or a shared bucket. The recipient loads the files.
This is simple to start with. It causes problems as it grows:
- Stale data. The copy is old the moment it is made. Recipients work from yesterday's export, or last month's.
- Many copies. Every recipient holds their own copy, so you cannot say which version anyone is using.
- No access control after delivery. Once the file leaves, you cannot revoke it or restrict which rows are read.
- Schema drift. If you add or rename a column, downstream loads break without warning.
- Pipeline upkeep. Each recipient needs an export job, a delivery job and monitoring. The work grows with the number of recipients.
Approach 2: build a custom API
You write a service that queries your tables and returns JSON. You get authentication, filtering and a current view of the data.
The costs move elsewhere:
- Your service carries all the traffic. Large tables need pagination, retries and compute that you pay for.
- JSON is a poor format for analytical data. Recipients must write code to turn it back into tables.
- Each recipient has their own tools, so you end up supporting several client integrations.
- You own the API's security, versioning and uptime.
Why vendor-locked sharing also falls short
A third option is a sharing feature built into one data platform. It works well when both sides use that platform. Your partner may use a different one, or none. Then you are back to copies or a custom API.
What a good solution needs
The shortcomings above point to a list of requirements.
| Requirement | Why it matters |
|---|---|
| Live data | Recipients read current data, not a stale export. |
| No copies to manage | The provider keeps one source of truth. |
| Access control | The provider can grant and revoke access per recipient. |
| Efficient transfer | Large tables should not pass through a bottleneck service. |
| Open standard | Recipients can use pandas, Spark or other tools without sharing a vendor. |
Delta Sharing is an open protocol designed around these requirements. The next chapters build up to it.
The three approaches compared
In the first approach the data is duplicated. In the second, all of it passes through the provider's service. In the third, the server only decides who may read. The data itself moves straight from storage to the recipient.
Common mistakes when sizing the problem
- Treating sharing as a one-off export. Recipients usually come back for updates, so plan for repeated access.
- Counting only storage cost. Network transfer out of the provider's cloud region (egress) and the engineering time spent on pipelines often cost more.
- Ignoring revocation. Decide up front how you will end a partner's access, and test it.
Exercise
A supplier gets a nightly CSV export of your sales table by SFTP. Name two problems that get worse as you add more suppliers, and say which requirement from the table would address each.
Show answer
Any two of: stale data (needs live data), many copies you cannot track (needs no copies to manage), no way to revoke access after delivery (needs access control), and a separate export pipeline per supplier (needs an open standard and efficient transfer, so one setup serves everyone).
Exercise
A custom REST API returns table rows as JSON. Why does it become a bottleneck for a multi-terabyte table?
Show answer
All data passes through the provider's API service. That service needs compute, pagination and retry handling, and the provider pays for the traffic. JSON is also a bulky format for analytical data.