Home › Learn › Databricks compute and cost › Sharing data in and out
Databricks compute and cost · data engineering
Sharing data in and out of Databricks: Delta Sharing, clean rooms, UniForm, federation and every other way, with pictures
Two directions drawn method by method: how others read data Databricks owns (Delta Sharing, clean rooms, Marketplace, Iceberg REST catalog, SQL warehouse, push, export) and how Databricks reads data others own (federation, external locations, connectors, Auto Loader, streams), each with how it works inside, when to use it, when not to, cost, performance and security.
Prices, defaults, limits and preview status change often, and dollar figures here are illustrations. Check the current Databricks documentation and price list before quoting a number.
Sharing data in and out
Two directions, and three layers
Two questions get mixed up. Part A: how can someone else read data that Databricks owns? Part B: how can Databricks read data that someone else owns? Each has its own set of methods. Every method below has a picture of how it works inside, a list for when to use it, and a list for when not to.
| Layer | The question it answers | Names you will meet |
|---|---|---|
| 1. Reading the data | "Can they read my table, safely, without me copying it?" | Delta Sharing, Marketplace, SQL warehouse, Lakehouse Federation |
| 2. Computing without seeing | "Can we answer one question together without either of us showing our rows?" | Clean room |
| 3. File format and catalog | "Can another engine read the same files?" | UniForm, Iceberg REST catalog, catalog federation, managed Iceberg tables |
Delta Sharing is a protocol (layer 1). A clean room is a product that uses it (layer 2). UniForm is a file format trick (layer 3) and shares nothing by itself.
Part A · others read what Databricks owns
Part A: others read data Databricks owns, at a glance
| Way out | Consumer gets | Best for | Verdict |
|---|---|---|---|
| A1 Delta Sharing, Databricks to Databricks | Live read-only tables | Partner on Databricks | Pursue |
| A2 Delta Sharing, open | Live read-only tables | Partner on another platform | Pursue |
| A3 Clean room | Only approved answers | Rows may not be revealed | Pursue, only for a real privacy need |
| A4 Marketplace | A share, found through a listing | Many or unknown consumers | Pursue |
| A5 UniForm and Iceberg REST catalog | Direct file reads by their engine | Your own other engines | Pursue |
| A6 SQL warehouse API, JDBC, ODBC | Query answers | Apps and BI | Pursue |
| A7 Push to another system | Their own copy in their system | Operational targets | Pursue |
| A8 File export | Files | Receivers that can only take files | Last resort |
| Storage keys on managed table paths | Everything, ungoverned | Nothing | Drop: bypasses Unity Catalog, so no audit, masks or revoke |
Choosing, step by step
- Is the consumer an app or a person? Use A6, the SQL warehouse.
- Is the consumer a data platform? Ask "may they see my rows?" If not, build a clean room (A3).
- If yes and they are on Databricks, use A1. If not, use A2.
- Many unknown buyers? Use the Marketplace (A4).
- Your own other engines on your own data? Use A5.
- Does an operational system need the data inside it? Push it (A7). Only a file will do? Export it (A8), last.
Part A · others read what Databricks owns
A1. Delta Sharing, Databricks to Databricks
Both sides use Unity Catalog. The recipient mounts your share as a catalog in their own workspace and queries it like any other table. Nothing is copied.
Under the hood
- It is a live read of your table, not a snapshot. The recipient sees new commits as you make them.
- The recipient can read tables, views, volumes, notebooks and AI models, and can read the table history or stream the changes.
- Access is read-only, and you can revoke it at any time. Links expire in minutes, so revoking takes effect quickly.
- Governance, audit and lineage stay in Unity Catalog on both sides.
| Use it when | Do not use it when |
|---|---|
|
|
Cost, performance and security
| Cost and performance | Security |
|---|---|
|
|
Part A · others read what Databricks owns
A2. Delta Sharing, open sharing
The same protocol, but the recipient is not on Databricks. They use a credential and any tool that has a Delta Sharing client.
Under the hood
- The credential is a token with an expiry. You must rotate it and treat the file like a password.
- The protocol is open, so any tool with a client can read. Databricks does not need to be on the other side.
- You can share a table, a view, or a slice, and use dynamic views for row and column filtering.
- Compute for reading is the recipient's, billed to them. The storage requests land on your bucket.
| Use it when | Do not use it when |
|---|---|
|
|
Cost, performance and security
| Cost and performance | Security |
|---|---|
|
|
Part A · others read what Databricks owns
A3. Clean room, taught from zero
Everything so far hands the other side rows. A clean room is for when you must not.
The problem it solves
A shop knows who bought what. A brand knows who saw its online advert. Together they could answer a valuable question: "Of the people who saw the advert, how many bought?" To answer it, somebody has to match the two customer lists. But neither side may hand its list to the other. Customer lists are private, and privacy law forbids passing them around.
The old ways, and why they fail
- Swap the lists. Now each side holds the other's customers. This is exactly what you were not allowed to do.
- Give both lists to a third party. You moved the risk to someone else, and you must trust them completely.
- Hash the emails and swap those. Better, but the other side can still test any email they already know against the hashes.
The clean room idea
Build a locked room. Both sides place their data inside it, and neither can look at the other's rows. The only thing that runs in the room is a piece of code that both sides have read and approved. Only the result of that code comes out, for example a count, never the rows.
Under the hood
| Promise | How it is kept |
|---|---|
| Raw data is not handed over | Each side keeps its tables in its own account. They are shared into the room using Delta Sharing, so the other side can see names and columns but not rows. Rows are only touched by approved code. |
| Only agreed code runs | A notebook is proposed by one side and must be approved by the others before anyone can run it. Changing the code means approving again. |
| Results are limited | The approved notebook runs on serverless compute that Databricks manages, and only its output tables come out, to the party that ran it. |
| You can prove what happened | Runs and approvals are recorded in an audit log. |
Where a clean room can still leak. The room guarantees who approved what code. It does not judge whether the output is safe. A notebook that simply wrote out one customer per row would be approved and would run. So the privacy rule has to be written into the notebook and checked by the reviewers: for example, never output a group smaller than 100 people, and never output a column that identifies a person.
Industry idea, Databricks product
"Data clean room" is an industry idea that began in advertising. Snowflake, AWS, Google, LiveRamp and others sell their own versions, and they enforce privacy in different ways (query rules, thresholds, encryption). Databricks Clean Rooms is Databricks' version, built on Delta Sharing and Unity Catalog. When a client says "clean room", ask which one they mean.
| Use it when | Do not use it when |
|---|---|
|
|
Cost, performance and security
| Cost and performance | Security |
|---|---|
|
|
Part A · others read what Databricks owns
A4. Marketplace
A catalogue of listings built on top of Delta Sharing. It adds discovery, requests, approvals and optional payment. The data still moves by sharing.
Under the hood
- Marketplace is a listing and approval layer, not a different transport. Reads are Delta Sharing reads.
- Listings can carry notebooks, models and sample queries so a consumer can try the data fast.
- You still carry the sharing, storage-request and transfer costs of every consumer's reads.
| Use it when | Do not use it when |
|---|---|
|
|
Cost, performance and security
| Cost and performance | Security |
|---|---|
|
|
Part A · others read what Databricks owns
A5. UniForm and the Iceberg REST catalog
This lets your own other engines read the same files you already have, as an Iceberg table, under Unity Catalog permissions.
Under the hood
- UniForm writes Iceberg metadata after each Delta commit, pointing at the same Parquet files. There is one copy of the data in two formats.
- The metadata is produced after the commit, so an Iceberg reader can be a little behind. Test the lag before promising freshness.
- Managed Iceberg tables are natively Iceberg in Unity Catalog, with no Delta log at all. They are a different table type, not a view of a Delta one.
- The consumer must be trusted. It receives storage credentials, so the permission check happens at the catalog, not on every file.
| Delta Sharing | UniForm and Iceberg REST catalog | |
|---|---|---|
| What it is | A sharing protocol with recipients | A format plus a catalog endpoint |
| Reader needs | A Delta Sharing client | An Iceberg-capable engine |
| How rows reach the reader | Signed links from the sharing server | Storage credentials from Unity Catalog, then direct reads |
| Best across an organisation | Yes: recipient, audit and revoke are built in | No. It assumes you trust the engine. |
| Best inside your estate | Adds a boundary you do not need | Yes: many engines, one copy |
| Use it when | Do not use it when |
|---|---|
|
|
Cost, performance and security
| Cost and performance | Security |
|---|---|
|
|
Part A · others read what Databricks owns
A6. SQL warehouse API, JDBC and ODBC
The consumer does not get tables. It sends SQL and gets answers back. Databricks does the reading with its own compute.
Under the hood
- Every query uses warehouse compute and is billed, so many small queries on a stopped warehouse can cost more than expected from start-up time.
- Row filters and column masks apply because it is Databricks that runs the query.
- Result size and result cache both matter: the same query repeated may be answered from cache.
| Use it when | Do not use it when |
|---|---|
|
|
Cost, performance and security
| Cost and performance | Security |
|---|---|
|
|
Part A · others read what Databricks owns
A7. Push to another system
Instead of waiting for someone to read, your job writes the rows into the system that needs them: an operational database, a queue, a CRM or a serving store.
Under the hood
- The target gets a copy. If the source changes, the copy is wrong until the next push.
- Retries happen. Make every write idempotent with a business key, or use the sink's exactly-once feature where it exists.
- Too many parallel connections can overload the target. Cap the number of write partitions.
| Use it when | Do not use it when |
|---|---|
|
|
Cost, performance and security
| Cost and performance | Security |
|---|---|
|
|
Part A · others read what Databricks owns
A8. File export
You write files to a bucket or an SFTP drop and the other side collects them. It is the oldest way and the weakest.
Under the hood
- A snapshot goes stale the moment it is written.
- Add a manifest or a marker file when the folder is complete, or the receiver may read half-written files.
- Expire old folders. Every export is a copy somebody else may keep for ever.
| Use it when | Do not use it when |
|---|---|
|
|
Cost, performance and security
| Cost and performance | Security |
|---|---|
|
|
Part B · Databricks reads what others own
Part B: Databricks reads data others own, at a glance
| Way in | Where the data lives | Best for | Verdict |
|---|---|---|---|
| B1 Lakehouse Federation (query) | Stays in the source database | Exploring, small lookups, prototypes | Pursue, for light use |
| B2 Catalog federation | Stays in the other engine's files | A lake another engine owns | Pursue |
| B3 External locations, tables, volumes | Stays in the folder | Shared lake, raw landing files | Pursue |
| B4 Delta Sharing as a recipient | Stays at the provider | Partner or vendor data, no pipeline | Pursue |
| B5 Lakeflow Connect | Copied into Delta, kept current | Supported SaaS and databases | Pursue |
| B6 Auto Loader | Copied into Delta | Files landing over time | Pursue |
| B7 Streaming sources | Copied into Delta | Event streams | Pursue |
| B8 JDBC and custom code | Copied into Delta | Sources nothing else covers | Fallback |
Choosing, step by step
- Must the data stay where it is, and the use is light or exploratory? Use B1.
- Is it files that another engine or catalog owns? Use B2. Plain folders with no catalog? Use B3.
- Is a partner publishing it through Delta Sharing? Use B4.
- Do you need your own copy, kept fresh? Use B5 for a supported source, B6 for files, B7 for events and B8 only if nothing else fits.
- Will the same remote table be read again and again? Stop federating. Copy it once and keep it current.
Part B · Databricks reads what others own
B1. Lakehouse Federation (query federation)
Databricks queries an external database in place. An admin makes a connection and a foreign catalog, and the remote tables then look like tables in Unity Catalog.
Under the hood
- No data is stored in Databricks. Each query reads the source again, so the source carries the load.
- Pushdown decides the speed. A filter or aggregate that cannot be pushed down means pulling many rows across the network.
- Governance is Unity Catalog's: grants on the foreign catalog, with the connection's own credential used on the remote side.
- Credentials sit in the connection, so one account at the source serves everyone allowed to use the connection.
| Use it when | Do not use it when |
|---|---|
|
|
Cost, performance and security
| Cost and performance | Security |
|---|---|
|
|
Part B · Databricks reads what others own
B2. Catalog federation
The data is files in cloud storage, but another catalog (a Hive metastore, AWS Glue, Snowflake's open catalog or another Iceberg REST catalog) owns the metadata. Databricks asks that catalog which files, then reads the files itself.
Under the hood
- Compared with query federation, the other engine's compute is not used at all, so it carries no load.
- Reading is allowed to follow the other catalog's metadata, so what you see can be briefly behind its latest commit.
- Unity Catalog governs who in Databricks may read. You must still give Databricks permission on the bucket.
- Check which catalogs and table formats are supported in your region before you rely on this.
| Use it when | Do not use it when |
|---|---|
|
|
Cost, performance and security
| Cost and performance | Security |
|---|---|
|
|
Part B · Databricks reads what others own
B3. External locations, external tables and volumes
You point Unity Catalog at a folder in cloud storage, give it a credential, and then define tables or volumes over that folder. Databricks reads in place.
Under the hood
- Set-up is once per folder: a storage credential (an IAM role or managed identity) and an external location with the path.
- A table over files you do not manage gets none of the automatic maintenance that managed tables get. Compaction and clean-up stay your job.
- Other writers can change the files while you read. A Delta table makes that safe, but a folder of CSVs does not.
| Use it when | Do not use it when |
|---|---|
|
|
Cost, performance and security
| Cost and performance | Security |
|---|---|
|
|
Part B · Databricks reads what others own
B4. Delta Sharing as a recipient
This is A1 and A2 seen from the receiving side. A provider shares tables with you, and you mount the share as a read-only catalog.
Under the hood
- It is read-only and live. You see what they publish, when they publish it.
- You do not control the provider's history, retention, schema changes or when they revoke.
- If the provider is in another region or cloud, every read can carry transfer fees. One fix is to copy once into your own region.
| Use it when | Do not use it when |
|---|---|
|
|
Cost, performance and security
| Cost and performance | Security |
|---|---|
|
|
Part B · Databricks reads what others own
B5. Lakeflow Connect (managed connectors)
Databricks runs the connection for you. It reads changes from a SaaS app or a database, lands them, and keeps your tables up to date incrementally.
Under the hood
- It is a copy. You pay for the pipeline compute and the storage, and you gain speed and independence from the source.
- For databases, change capture needs the source's change log enabled and a small gateway that reads it.
- The list of supported sources grows and has limits per source. Check it before designing around a connector.
| Use it when | Do not use it when |
|---|---|
|
|
Cost, performance and security
| Cost and performance | Security |
|---|---|
|
|
Part B · Databricks reads what others own
B6. Auto Loader (files landing in storage)
Other systems drop files into a bucket. Auto Loader notices new files and ingests each one exactly once.
Under the hood
- Listing mode is simple but slows down in a very large folder. Notification mode scales better and needs some cloud set-up.
- The checkpoint is the memory. If you delete it, files are read again.
- It can run continuously or as a scheduled batch that stops when there is nothing new.
| Use it when | Do not use it when |
|---|---|
|
|
Cost, performance and security
| Cost and performance | Security |
|---|---|
|
|
Part B · Databricks reads what others own
B7. Streaming sources: Kafka, Event Hubs, Kinesis, Pub/Sub
Events live in a broker for a while. A Structured Streaming query reads them in order and remembers how far it got.
Under the hood
- If the query is down for longer than the broker's retention, events are gone. Size retention for your worst outage.
- Delta as the sink makes the write exactly-once, so replays do not duplicate rows.
- Latency is seconds. Real-time lookups still belong in a serving layer.
| Use it when | Do not use it when |
|---|---|
|
|
Cost, performance and security
| Cost and performance | Security |
|---|---|
|
|
Part B · Databricks reads what others own
B8. JDBC and custom connectors in a job
You write the reading code. Spark opens several connections to the source and reads slices of a table in parallel.
Under the hood
- Without a partition column, Spark uses one connection and one task, so a large table is read very slowly.
- Each connection loads the source. Cap the partition count so you do not overload it.
- Custom Python or REST code runs on the driver or in functions. Large API pulls need their own paging and retries.
| Use it when | Do not use it when |
|---|---|
|
|
Cost, performance and security
| Cost and performance | Security |
|---|---|
|
|
Worked example
Exposing Unity Catalog tables to AWS services
The right route depends on what the AWS service needs.
| AWS consumer | Route | Verdict |
|---|---|---|
| Athena, Redshift, EMR, Glue reading the same tables | A5: Iceberg REST catalog. Athena and Redshift through Glue Data Catalog federation, so Lake Formation governs on the AWS side. | Pursue: no copy, no Databricks compute |
| Lambda, ECS, Step Functions, QuickSight needing answers | A6: SQL warehouse API, JDBC, or the QuickSight Databricks connector | Pursue |
| Another AWS account or another company's team | A2: Delta Sharing with a Spark or pandas client | Pursue: clean recipient boundary |
| A service that only takes files in S3 | A8: scheduled Parquet export | Last resort |
| Anything pointed straight at a managed table's S3 path | Bucket policy or keys | Drop |
Why not Delta Sharing for Athena and Redshift?
Delta Sharing needs a client on the reading side: a connector that asks the sharing server for signed file links and downloads the files itself. Spark, pandas, Power BI and similar tools have one. To my knowledge Athena and Redshift do not, because they read through the AWS Glue catalog and Lake Formation instead. To use Delta Sharing with them you would build a Glue or EMR Spark job that reads the share and writes a copy into S3 or Redshift. That brings back a pipeline and a staleness window. Other reasons it fits badly inside your own AWS estate:
- The reader must understand the table's Delta features, and some AWS-side readers lag behind newer ones.
- Every read goes through signed links, which suits modest tables more than large warehouse scans.
- Delta Sharing is built for crossing an organisation boundary. Inside your own estate that boundary only adds cost.
Use Delta Sharing for an AWS party that is a different organisation, or for one that reads through a Spark or pandas client.
Both directions
Cost traps and things to watch
| Trap | Why | What to do |
|---|---|---|
| Cross-region or cross-cloud reads | The cloud provider charges when data leaves a region, on every read | Keep the consumer in the data's region, or replicate once. See cross-region cost. |
| Direct reads by an outside engine (A5, B2, B3) | Their compute is billed to them, but the storage requests land on the bucket owner | Watch request costs on the bucket. Keep files compacted so there are fewer, larger ones. |
| Federated queries run again and again (B1) | Each run reads the source again, and the source's owner carries the load | Once a query is routine, ingest the table instead. |
| UniForm lag (A5) | Iceberg metadata is produced after the Delta commit | Test the lag before promising freshness. |
| Clean room compute (A3) | Approved notebooks run on serverless compute, which is billed | Agree who pays for runs before you build the room. |
| Copies from exports and pushes (A7, A8) | Each one is a new copy outside governance | Prefer a live route. If you must copy, expire the copy. |
Security at a glance
| Route | Who enforces row and column rules | What the other side can do with data | Can you revoke? |
|---|---|---|---|
| A1, A2 Delta Sharing | You, through the views you share | Read it, and copy what they read | Yes, quickly |
| A3 Clean room | The approved notebook | See only approved outputs | Yes, remove the collaborator |
| A5 Iceberg REST catalog | Only table-level checks at the catalog | Read the files and copy them | Credentials expire; revoke the grant |
| A6 SQL warehouse | Databricks, on every query | See results only | Yes, remove the grant |
| A7, A8 push or export | Nobody, after it leaves | Keep everything | No |
| B1 Query federation | The source account and your grants | (inbound) users see what the connection account can see | Yes, drop the grant or connection |
| B2, B3 Reading others' files | Only grants in Databricks | (inbound) their row rules are not applied | Yes, remove the role |
Not confirmed here, check the current documentation: which AWS engines support Glue federation to Unity Catalog and in which regions; how many collaborators a Databricks clean room allows and which non-Databricks collaborators it supports; whether managed Iceberg tables are available in your account; the list of Lakehouse Federation sources and Lakeflow Connect connectors, which grows; which external catalogs catalog federation supports; and the size of UniForm metadata lag for your table type. This page was written from memory of the documentation.
FAQ
Questions people ask
Is a clean room the same as Delta Sharing?
No. Delta Sharing gives the other side rows to read. A clean room lets both sides run one approved piece of code over combined data, and only the approved results come out. Databricks clean rooms use Delta Sharing underneath.
Is UniForm a way of sharing data?
No. UniForm writes Iceberg metadata next to the Delta log so other engines can read the same files. Sharing needs a catalog and permissions as well, such as the Iceberg REST catalog or Delta Sharing.
Why not use Delta Sharing for Athena and Redshift?
Delta Sharing needs a client on the reading side, and to my knowledge Athena and Redshift do not have one. For your own AWS engines, use the Iceberg REST catalog or Glue federation. Use Delta Sharing for a different organisation or for Spark and pandas clients.
When should I ingest instead of federate?
When the same remote table is read again and again. Federation reads the source on every query, so a routine query is better served by a copy kept current.
Next
Where to go next
Related on this site: Cheapest way to move data in and out · UniForm · Cost and FinOps for the platform
All Databricks compute and cost pages · All data engineering · Databricks on this site