Skip to main content

Kernel, Catalog, Action! Reimagining our Delta-Spark Connector with DSv2

Summary

  • Three foundational pillars: This video outlines Delta Lake's architectural advancement through DSv2 (Spark Data Source v2), Delta Kernel integration, and Catalog Commits—enabling deeper catalog integration and improved query optimization.
  • Intelligent metadata management: Learn how Catalog Commits transform Delta into a catalog-aware format, enabling more efficient governance, fine-grained access control, and improved query performance for the Databricks Data and AI platform.
  • Modern lakehouse capabilities: Discover how Delta's redesign accelerates feature adoption, improves maintainability, and provides governance features like discoverability, namespaces, and table-level schemas that today's applications require.

Kernel, Catalog, Action! Reimagining our Delta-Spark Connector with DSv2

Watch: Kernel, Catalog, Action! Reimagining our Delta-Spark Connector with DSv2
Talk by Scott Sandre, Sr Software Engineer, Databricks
Delta Lake is redesigning its Spark connector through the combination of three key technologies: First, we're updating our Spark APIs to DSv2 to achieve deeper catalog integration and improved integration with the Spark optimizer. Second, we're fully integrating on top of Delta Kernel to take advantage of its simplified abstraction of Delta protocol complexities, accelerating feature adoption and improving maintainability. Third, we are transforming Delta to become a catalog-aware lakehouse format with Catalog Commits, enabling more efficient metadata management, governance and query performance. Join us to explore how we're advancing Delta Lake's architecture, pushing the boundaries of metadata management and creating a more intelligent, performant data lakehouse platform.
Here's more to explore:
Databricks named a leader in the 2024 Gartner® Magic Quadrant™for Cloud DBMS: https://www.databricks.com/resources/analyst-paper/databricks-named-leader-by-gartner
An open, unified approach to your data, BI and AI workloads: https://www.databricks.com/product/databricks-sql
See all the product announcements from Data + AI Summit: https://www.databricks.com/events/dataaisummit-2025-announcements

FAQs

What is DSv2 and why does it matter for Delta Lake?

DSv2 is the Data Source v2 API in Spark that enables deeper integration with the Spark optimizer and catalogs. This video explains how DSv2 allows Delta Lake to provide better query planning, improved performance, and tighter integration with Unity Catalog and other enterprise data governance systems.

What role does Delta Kernel play in this redesign?

Delta Kernel is a core component that simplifies Delta protocol complexity and accelerates feature adoption. By fully integrating on top of Delta Kernel, the new connector improves maintainability and enables faster rollout of new Delta table features without duplicating protocol logic.

What are Catalog Commits and what do they enable?

Catalog Commits transform Delta from a format-only specification into a catalog-aware storage format. This enables more efficient metadata management, centralized governance policies, improved discoverability, and better query performance on the Databricks Data and AI platform.

How does this affect users building data lakehouses?

This video shows that these architectural changes translate into better governance features (fine-grained access, namespaces, schemas), improved performance, and easier feature adoption. Users benefit from a more intelligent, performant data lakehouse platform that simplifies building and maintaining modern data infrastructure.

Full transcript

Thanks everyone for coming. Uh. I'm a software engineer at Data Bricks. I work on the Delta ecosystem team. And today I'm going to be talking to you about the three new pillars of technology for our new DSV2 data source v2 spark connector. A bit about me before we begin. I've been at data bricks for four years. I've been working on all things Delta open source. So that's advancing the protocol and designing new uh Delta table features.
That's working on our various Delta integration connectors like Flink and Spark. And recently uh a heavy focus on our new kernel library that I'll be talking about today as well as the actual catalog integration of Delta into the catalog and building that in kernel. I think everyone can hear me. Okay, let's get started. So today I'm going to be talking about the three big bets, the three big focuses of our next generation uh Delta Spark connector.
And the first one of these is the catalog. So the catalog is quickly becoming the next foundational building block in building a modern data lakehouse. And the catalog came to be important for a variety of reasons. So for the past several years, various open lakehouse formats like Delta and iceberg uh they've been adding features and integrating into engines and making these engines um um more powerful powerful and more capable.
So we've been designing new table features like deletion vectors which make your merge and updates faster and deletes. We've been building new capabilities like CDF. We've been letting you sort and optimize and zorder all of your data, uh, vacuum it and all these great capabilities, but now the next generation of features and capabilities that our customers and users want can't really be provided by the data source format alone.
And we actually start to look to the catalog for a lot of these things. So most of our user users now um they don't just need you know like a safe folder where they can write and have atomicity with their transactions um in their folder in the cloud. They want more features built on top of that. So governance you know they want to know who is accessing their table um and how is that changing over time. They want to have fine grain access control to make sure that only the right users with the right permissions are touching their data.
They want discoverability. They don't just want a bucket in S3 with a bunch of tables. you know, you want name spaces and schemas and table names. Okay. Um, furthermore, when you start to have this sort of metadata and names and comments on your on your various columns in your table, on the data bricks platform, for example, we can now build AI on top of this. So, on data bicks, because of the catalog and because the catalog knows everything about your tables, you can now just write SQL queries using English and we'll just take your English, create the SQL query.
We know everything about your table, everything about the columns and whatnot. And this just makes you know things a lot more discoverable like you can ask like which of my tables or where do I get this answer about my employee data in Europe and the catalog now start to answer this uh these sorts of questions. You know cataloges give observability. We can actually have row lineage and see how your data is changing over time.
Of course cataloges can provide fine grade security and access controls. A new big demand uh these days is building the common um capability of multi-statement and multi-table transactions that you can of course perform in databases to the lakehouse and this can't be solved by the cloud storage alone. You know a catalog needs to be involved as the one central coordinator to be the transaction broker for multi-statement transactions and performance.
There's a lot of fancy performance capabilities like caching that a catalog can bring to um iceberg and delta for example. So, this is the first technology. The second technology uh that we're all in on for our next data source v2 connector is Delta kernel. So, for those of you that don't know, you know, Delta kernel arose two years ago. I think that's when we first announced it at data bricks. So, it's completely open source.
Um it arose two years ago uh because there was a problem. You know, the delta ecosystem was fragmented. So all these engines, all these connectors want to deeply integrate to Delta. You know, customers want the latest Delta features. They want deletion vectors, they want variant, they want shredding, they want um um um iceberg metadata translation, uh they want CDF capabilities. And all of these are advanced delta table features that we're adding.
You know, we do several releases throughout the year. But if you have like for example X delta features and Y connectors that's X times Y work needed to bring the ecosystem along with delta and this just was not scaling. So our solution was kernel and kernel is the one right delta abstraction where there's not this uh you know cartisian explosion of delta features and connectors. We actually are trying to have a solution of deeply integrate once and get upgrades for free.
You can imagine this like a CSV or a paret library, right? Like as CSV and part your parade library adds bugs and adds more improvements and features. Your engine code shouldn't have to change. You should just bump the version number and get these new capabilities for free. And that's the exact goal of kernel. So the first thing Colonel wanted to introduce was a narrow set of table APIs for your connector and I'll be going through an example on the right hand side in a second.
These table APIs are what your connector sees in order to execute reads and writes. So we can give you a snapshot of your table at a particular point in time. We can give you opaque scan tasks where your engine doesn't have to know the details of Delta and the details of how Delta executes a scan. Your engine just knows it has to serialize this to all of its executives and the exeutors need to go back into kernel and use kernel utilities to help facilitate the right throughout all of these APIs.
We abstract away the delta protocol engines do not need to know delta protocol internals. So at the end I'll be showing you like a very simple diagram of what our DSV2 connector will actually look like. And our DSV2 connector does not need to know about Delta. And we're really excited about this. We're going to take the same approach to Flink for example and we're for example we're working with our friends at Trino to like see if they can reuse uh kernel as well.
Along this way as we really try to simplify the connector journey we also want to allow kernel to let engines do what engines do best. Engines do you know serialization and distributed work to executives best. Kernel should not be prescribing how engines should do engine things. So along the way, we want engines to have full control over this. Uh for example, you know, the goal of our DSV2 connector is to have the exact same, if not better performance than our DSV1 connector built on top of kernel.
So kernel does not prohibit uh engines and connectors from achieving this. So to give you a simple example, you know, this is uh a case where a con a connector wants to affect a query and get back some engine data, its own memory representation of data to return to the user. And the first place it goes is into kernel and into our scan APIs. Kernel then takes care of doing all the delta protocol internal logic. You know delta is a series of deltas of series of commits and you have to replay the commits to get the latest version of the table.
And this is something that kernel should handle. Uh today for example it's singlethreaded but we're actually working on allowing engines to do the replay in a distributed manner where they get that great distributed performance but again they don't have to care about how replay is actually done. Um Delta also you know we generate the filters and the expressions to do data skipping over your data but we don't you know we don't evaluate that ourselves we give that to the engine because engines know how to evaluate their own expressions best.
So Spark will evaluate Spark expressions. Duct DB in the native ecosystem will evaluate duct DB's representation of expressions. We don't prescribe that. Here are the engine API. So while kernel is doing all this work, kernel will need some work to get done. Colonel will need some JSON files to be read or written, some parquet files to be read or written. We might need you to list from the cloud and we might need you to evaluate expressions.
So kernel will of course ship with a default library that you're free to use that will get this job done. But you can override any of these capabilities and then your engine can can do like its own work and its own memory representation its own way. Um so we're really happy about this API design and of course you know the engine is the thing that ultimately goes to cloud cloud storage kernel doesn't prescribe this and I can be taking uh questions at the end.
Um yeah I don't know if you can distribute microphones or we can just come up and chat. Of course, the next thing that we're we're focusing on is DSV2. So, today Delta Spark is built on DSV1, uh, which is, you know, uh, data bricks is the original creators of Apache Spark. Uh, this is the sort of first API that we worked on, but in the past several years, um, the ice the Spark community, I believe DSV2 was originally created by some iceberg folks at Netflix, they've been building a brand new data source API.
This is the API that lets Spark the compute engine understand what is your data source, what does it look like, how do we do reads and writes, and how do we, for example, push down information of like user intent like the read schema or the um the the query filter? How do we push that down into the data source where it can now um affect any optimizations that's it that it's capable of? So DSV2 is certainly the future of you know the core spark data source abstraction but I think it's worth talking about like what what problems with DSV1 today.
So as I've talked about kernel and as I've talked about cataloges you know this is certainly the future of delta but DSV1 is not catalog aware. So building for example um streaming reads is actually really hard to do. you know, DSV1 doesn't really like doing time travel on file system based sources, and it has some inconsistent APIs uh for read and write. Um, Ryan Blue has a great talk on YouTube that talks about some of the early motivations of problems of DSC1 and motivations of DSV2.
So, DSV2 is deeply catalog aware, which is great. That's the future of kernel. That's the future of Delta. Um, it standardizes right paths and it does a great job at letting data sources push down their complex DML implementation into the engine. So with all this talk of Delta and iceberg and lakehouse formats and unification going on these days, what both of the Delta and the iceberg communities are really excited about is not reimplementing merge and update.
We let Spark do this in DSV2 and we as a data source delete all that code and just provide the APIs and the answers and the hints that Spark needs. So what have we built so far? Um the exciting thing that I've been working on the past six months is catalog manage delta tables. This is a new delta table feature that transforms how delta tables are discovered and written. It it it changes how they're uh you know read and uh read and write.
Um, so what we've built is a brand new delta table feature that says the catalog must broker all rights and the catalog must be informed of all right paths and then if you're involved in the rights, the catalog of course has to be involved in the read. So we kind of now have a very purposeful split brain where cat the catalog knows about the latest commits to the table and over time because the catalog doesn't have infin infinite scalable storage the catalog can backfill to the delta log and therefore you can like bound how much uh data and commits it has to maintain over time.
And as we built this in kernel um we actually had to do two versions of this. We actually uh pivoted halfway through the project about 4 months ago. Um internally this is like a catalog managed V2 because V1 was not working. Um and we realized that we need to keep catalog references out. So that there will be a blog post incoming. But what I'm really happy um that we were able to correctly engineer is that when you integrate your engine with kernel with a catalog um things are simple. there's a clear uh dividing line of abstraction where kernel and your engine don't have to plum through catalog references everywhere and your catalog table can't just randomly update halfway through your query.
Um we're really happy with how we've defined this. Another thing I'm I'm very excited about this design is kernel isn't prescribing what your catalog has to look like. We have a very narrow understanding of a catalog in kernel. It's really just commit. So colonel will and the engine will give the engine the information to pass on to some catalog implementation to commit and the catalog can do that however it wants. It could commit to unity catalog and unity has its own commit API.
It could commit to hive metas store. Maybe hive meta store is representation of a delta commit. It's just a series of key value pairs. Or it could be an in-memory uh catalog or a catalog that actually just relies on put if absent. So what's great here is that we are not prescribing what your catalog must do. uh we're not prescribing a catalog API. We're just saying, hey, we need this very narrow callback, a commit function, and you're free to implement that on its own.
So, what comes next is bringing this all together. We want to build a new Delta Spark connector. We want to have it deeply integrated into a catalog. A lot of performance benefits for that. A lot of capabilities that you can build in your uh uh data lake and your lakehouse on top of the catalog. We want to use the future of Delta abstractions. We want to use Delta kernel. Uh, you know, our our our DSV2 connector won't have any Delta logic inside of it.
We're really excited about that. And of course, we want to use the new DSV2 Spark API. So, now just going to give you like a bit of um a a bit of a walkthrough of like what this connector will look like and maybe I'll call out some simplifications that we've made along the way. Um, so the first thing is the first thing that your Spark or your engine will talk to is some Unity catalog managed client. This is the Delta Unity client that knows about this table feature and knows about your catalog.
And this client doesn't actually have to be spark oriented. So the same jar that we produce here, we plan on reusing in Flink and all across the JVM ecosystem. And something I haven't you know emphasized throughout this talk is uh there's both a Java kernel and a rust kernel for the native ecosystem. So we have the same goal in the native land. We want to have one of these crates in native that can be used all across C, C++, Go, Python, etc.
Uh so code reuse is is uh the goal here. This UC catalog manage client will of course talk to uni catalog server and get back the latest commits. Another great thing here is that we don't tell the catalog how to represent the commit information. We just give them the commit information. So what's really cool here is, you know, if it's a really large commit, you could write it out to a delta file in S3, just like, you know, that's been the way commits have been done in Delta for years.
But if it's a small commit, for example, you can actually just send it in line without going to S3. And your catalog can store it in line as well. And then of course on the read path you get back just like a bite stream the inline representation. So right there you've saved 200 seconds on the commit path. And then on the read path you also don't need to go to S3. So things like this can really help to have a a performant connector.
After um at this point, what we've done in kernel is we've created a very flexible interface where engines and catalogs can give kernel all the information they know about, but they don't really have to know about much. You really just need to give us a path and a version you want to load. And that's just like path-based access. Colonel can go and figure out the rest. But if you happen to have other information, if you happen to have the latest log information like the ratified commits in the catalog or you happen to actually save the schema at a particular version, you can give all of this to kernel and kernel won't like waste cycles or or waste compute trying to go and figure that out.
So with this approach, what we're actually planning to do is that during query analysis, we won't be going to the file system at all. So in your Spark DSP2 connector when you want to plan your query, we're saving hundreds of milliseconds by not actually having to do any um any fetching from S3 or any compute and replay the log to figure out the latest schema of the table. All of this will just come from the catalog. So uh we we're really excited for some of the performance gains there.
And lastly, you know, this table builder, it produces this kernel construct. We call it a resolve table. It's a snapshot of your delta log in your table at a point in time. And this is the core, you know, facilitator of any logic that the Spark DSV2 table interface requires. So this table interface wants, for example, a scan uh scan reader and a scan reader basically produces scan reads that happen on each executive.
And there's basically a onetoone mapping of these DSV2 interfaces to kernel interfaces. So kernel table is going along the way producing all the constructs that the the DSP2 APIs need and the same goes on the right hand on the right path. Um there's a batch writer batch writer produces all these things that gets sent to executive and kernel there right along with it and again along along this way there's no catalog references there's no complexity passed through from your catalog client into DSV2 all that's passed through is a single committer the bottom green block and this is the the um function that we invoke that goes back into your catalog.
Um so we we really do think that this will be a very scalable um once you understand it uh simple experience for cataloges and engines to integrate with kernel. Um so the next steps here are you know the kernel catalog manage table support is still work in progress. The catalog managed delta protocol feature is actually still in progress. It's it's in our request for comment stage. So you can go on our GitHub and check it out. uh delta iodelta and you know comment on it um you know will it work with glue will it work with polaris let us know uh we've done our best um and then once this is all wrapped up uh in the coming months we start we plan to go like full steam ahead on our DSV2 connector um all this is open source uh there's no secrets here all the project planning all the design docs um so you know if you want to like help out like please join our Slack um I really should have had our Slack on on the last slide uh but you know if you're if you're passionate about working on this like please message me and please uh comment on GitHub and like we can work together and I would I would love all the help the help and expertise uh that I can get.
So that's all for me today. Uh thanks everyone for coming. Um I don't think there's any mics but like if there's no next talk I can just take some questions here if there's if anyone has any. So thanks so much

Learn more about the Databricks Data and AI platform.

The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.