Skip to main content

Introduction to Modern Open Table Formats and Catalogs

Summary

  • Modern table format fundamentals: Bart and Sirui explain why open formats like Delta Lake and Iceberg emerged—solving data warehousing limitations like poor ACID support, schema evolution and interoperability.
  • Delta Lake and Iceberg design: Deep dive into how these formats handle transactional consistency, version control, time travel and schema management—enabling reliable, auditable data platforms.
  • Open catalog ecosystem: Discussion of Unity Catalog, Polaris and interoperability trends—showing how organizations avoid vendor lock-in while maintaining governance standards across tools.

Introduction to Modern Open Table Formats and Catalogs

Watch: Introduction to Modern Open Table Formats and Catalogs
Talk by Bart Samwel, Principal Software Engineer, Databricks; Sirui Sun, Sr. Manager, Product Management, Databricks
In this video, learn about why modern open table formats like Delta and Iceberg are a big deal and how they work with catalogs. Learn about what motivated their creation, how they work, what benefits they can bring to your data and AI platform. Hear about how these formats are becoming increasingly interoperable and what our vision is for their future.
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

Why do open table formats like Delta and Iceberg exist?

Traditional data warehouses lacked ACID transactions, schema flexibility and interoperability. Delta Lake and Iceberg solve these by adding transaction logs, versioning and open standards—enabling reliable, evolving data platforms.

How does Delta Lake provide ACID guarantees?

Delta stores transaction metadata in a log, versioning every change. This enables rollback, time travel and concurrent reads/writes without conflicts—critical for both analytics and operational systems.

Will open table formats like Iceberg and Delta Lake become standard?

This video demonstrates that open table formats are becoming enterprise standards due to preventing vendor lock-in and enabling tool interoperability. Iceberg and Delta Lake adoption continues growing as organizations value avoiding proprietary constraints. The Databricks Data and AI platform supports multiple formats, enabling standards-based data architecture.

How should I compare different open table formats?

This video compares Delta Lake and Iceberg highlighting distinct approaches to transactions, schema evolution, and compatibility. Delta provides optimized performance and deep Databricks integration, while Iceberg offers vendor-neutral specification and cross-tool support. Evaluation should consider workload patterns, existing tool investments, and long-term interoperability goals.

How do open table formats and governance work together?

This video shows that Unity Catalog provides unified governance across Delta and Iceberg tables through fine-grained access control and lineage tracking. The catalog layer ensures consistent policies regardless of underlying format. This separation enables teams choosing optimal formats while maintaining enterprise governance.

Full transcript

All right, awesome. Well, hello everyone. Good afternoon. Welcome to introduction to modern open table formats and catalogs. Let's go ahead and jump in with the obligatory boilerplate. TLDR everything here is informational. Uh, don't sue us if it if the future-facing things we promise don't come true. Uh, okay. First of all, who are we? Uh. I'm a product manager at Databricks. I work on a number of things, open table formats, all of the data intelligence we place on top of them on our managed tables offering, and then also disaster recovery.
So, hi. Um, I'm a software engineer at Databricks. Um, and I work mainly on Delta Lake, but also these days on disaster recovery. But, we won't be talking about that today. We'll be talking about tables. So, um, I'll get off the stage, let's redo his thing, and I'll be back later. All right. So, what is this talk about? Well, lately you may have heard a lot about the likes of Iceberg and Delta Lake and Hoodie and also about open data catalogs like Unity Catalog and Polaris.
And if you haven't heard about them, well, you certainly will be hearing a lot about them in the upcoming days. Uh, and as we'll see, these systems really form the basis of the open lakehouse. And understanding their foundations and why they exist and how they work is I think really key to understanding how the lakehouse works in general and how to get the most out of those systems. And so, that's what we're here to talk about today.
Over the course of the next 90 or so minutes, two major topics. The first one is why do these lakehouse uh what are these open table formats and catalogs exist? Right, we're going to build from first principles, the requirements, then the challenges that led to their development. And we're going to figure out, well, what problems do they solve and what can they help you with? And then second, thanks to, we're going to be able to deep dive into how these systems actually work underneath the covers.
So, we're going to kind of paint the story and the magic in the first half and then going to unravel what happens underneath to actually make the magic happen in the second half. All right. So, let's jump in. So, modern open table formats and catalogs, let's start with the challenges that they were built to solve and the requirements. And to do so, for this section, we're going to come up with a story. We're going to imagine that you are the head of data for Brick Bites, a new breakfast cereal.
Uh by the way, dad joke. What company produces Brick Bites? Unity Catalog. Ah, okay. Anyway, I got I got to got to keep it light. It's the last session of the day. So, anyway, your goal is to get serious cereal data to your downstream teams cuz we want to make Brick Bites the number one cereal in the world and to do so, we're going to sell the heck out of the cereal with data and AI. And so, jumping in, the first question you have to answer as the head of your data engineering team is where are you going to store this data?
Forget about what data exists and what the shape of it is, but where is it going to go? And the two big challenges you want are one, you don't want your data to be locked into a particular vendor and two, and this is very related, you want the flexibility to own the data and then bring the right tool for the job against that data, right? And the problem is that, you know, that obviously that sounds obvious, but historically this is not how storage has worked, right?
Traditionally, before the lakehouse, before all of the recent developments, uh storage was tightly coupled with compute. And what that means is if you used like a traditional database system uh to store the data, then the only way to actually get to that data was through their compute, through their engine. And later on if you were like, well, I don't want to use you anymore, uh then you actually have to go and copy the data out or or do jump through all sorts of painful hoops.
And so you don't want that. That's not how BrickBites is going to operate. And so the first requirement is that we want our solution to be able to solve is that we want to be uh we want to disaggregate storage from compute. You hear this term all the time. Really that just means you want to separate out compute and storage. Right? And so this translates into two deeper requirements. The first one is let's be able to store this in a place where I truly own the data.
I uh I own this data, no one can take it away from me. And you know, one one of the things that commodity cloud storage providers like S3 and ADLS have done is they've kind of solved this problem, right? They give you a place where you can store the data and it'll scale and you'll own the data, no one can take it away from you. And you own the actual bits on disk. And then two, uh you want it in open format. So what does that mean?
It means you're not you don't just want to store gibberish that no one else can understand. Right? You want there to be an open standard for how your tools are going to be able to interact with and read this data. And then furthermore, you're going to want for example open source implementations of how you read and write to this data. And an open standard means that, you know, these uh the format's not just going to change underneath you.
It's it's it's a constant thing that people agree on and there's a standard around it. And this truly ensures that your data is separate from compute. And so when you create a table like for maybe your sales data in BrickBites, now we don't know anything about what happens yet within the storage, but at least we can say that it's landing in commodity storage in a format that is open and then something that you own. Okay?
And so let's draw a man this out for the second and let's suppose that you run a command to create sales data for your cereal and we go and we dutifully land that data into a uh S3 bucket for the sake of example. And maybe what we have in this uh in this bucket are a bunch of CSVs. That's a good format, right? Or maybe we get even more advanced and we've and we say, "Hey, how about Parquet?" For those of you who don't know what Parquet is, I actually pretty sure most of you know what Parquet is, but for those of you who don't know, it's an open storage format, right?
And among its innovations is that instead of storing data in rows, it stores data in columns. And by storing data in columns, what it can do is it can do a really good job of compressing that data, of making column by column retrieval really fast. It supports complex data types, all this kind of stuff, and also it's an open standard, right? It's an open source format. So, you do create table, you got a bunch of Parquet in this in this folder.
And uh Well, mission accomplished, right? Uh well, not quite. In fact, we're not even close. Because even though you have this data in Parquet, uh a number of other challenges arise. And this is a core theme for us, because um it's quite really like from von Clausewitz, he was a military theorist in the 1800s, and he said something about war, which I think is also very applicable here. He said, "Everything in war is very simple, but the simplest thing is difficult."
And what he means is that, you know, the basic concepts of war are very simple, like I want to attack where my enemy is weakest and not where they're strongest. Uh but actually, when it comes down to it, the nuts and bolts of the problem space, uh if you consider the scale and the uncertainty in the space, it makes even the simplest things hard. And so, I think that applies equally to data engineering as well. In this case, we just want to own the data, we just want to write to it, uh we just want to read from it, but at scale in production, you realize that all of the nuances and all of the challenges all of a sudden make even the simplest thing hard.
And so, to illustrate that, let's go back to our Parquet table with the sales data, and let's suppose you've started running this in production, and you have two jobs that are operating against the table at the same time. You may not even intend to operate these two jobs at the same time, but it just happens to to be that way. And so, what if job number one is in the process of writing to this table. Maybe it's backfilling some historical data that was late arriving.
And then all of a sudden at the same time, perhaps kicked off by another user, job two just goes to scan the entire table. Like let's say they're just trying to get the sum of sales or something like that. And what you'll see is a very simplified model, but in the middle of the backfill, a job one is halfway done, and job two is doing the read. And so what's going to happen is that job two is actually going to read kind of an inconsistent weird state of the world, right?
And it's going to get an answer that doesn't make sense either in the pre-backfill world or the post-backfill world. It has kind of a a weird incorrect view. Okay? And so that doesn't make sense. And there are unfortunately many, many painful flavors of this problem that you we encounter all the time in production. Back in the world pre-open table formats that we dealt with all the time. So what if, you know, other painful examples?
Two writers updating the same data, the same table, and they're both actually trying to create a new file, but those that new file collides, and so the two end up overwriting each other. Now in that case, it's also wrong. You actually lost some data in that case from the one writer whose writer got data got overwritten. Or another really painful example is if a writer fails and needs to roll back. So maybe the job crashed or something like that.
What happens there? So maybe you go and try and frantically roll back that data, but what if there are readers accessing that data at the same time? He's going to see an even weirder view of the world. And so given all these painful flavors, what's going to happen is people are going to start to lose trust in the data, right? Sometimes it works, sometimes it doesn't. Sometimes I query it and I just get weird results.
And the problem there is people stop using the data. Or God forbid they copy it into a different system that maybe they trust more that's at least more isolated. Right? And so as the head of data for Big Bites, I I cannot have this, right? I don't want multiple copies floating around. I need people to trust the data for us to become a AI-powered breakfast cereal. So, what do we do? Well, we need to add to our requirements list for whatever system we must have acid.
How many of you here know what acid stands for? All right. So, like maybe half of you. Okay. So, this is a staple of database systems. It has been for the longest time. It's an absolute must-have and it's equally as important here as illustrated in the previous example. The A stands for atomicity. So, updates must either complete or fail entirely. So, if I'm making a right to a table, if I'm doing that backfill, it either completes or fails entirely.
We're not going to leave the table in a halfway state. The C is that the database only ever exists in valid states. So, no halfway states again. No getting trapped in a world where you're only partially valid. I is for isolation. So, if you have two transactions happening at the same time, it's as if they're executing in isolation. They're not going to interfere with each other or each other's results. And D stands for durability.
I don't have that here partially because you sort of already solved this in the previous world with parquet. Cloud storage is really good at making things durable. So, at least when you write something, you're not going to lose it. But, that's also a key property as well that we kind of already have. And so, we have acid. Now, people are starting to trust the data more. Reads and writes are a little bit more consistent and understandable.
And what other seemingly simple thing could go wrong? Let's consider the schema of our table. Now, if you're just writing a bunch of data files, the nice thing about parquet is that it's actually self-documenting in terms of its schema. So, as a writer, when you write a single parquet file, in the footer of the parquet file, you'll actually write the schema of the file itself. So, you'll say, I have these I have column one, it's a timestamp and this is its name, column two, and so on and so forth.
And so, this seems pretty easy to write and read the schema of a table. The writer just writes it in the footer, the reader reads the footer, and off to the races. But, here's another simple thing that ends up being harder and harder in production because you might end up struggling with something called schema drift. And so the problem is, well, what happens if at scale in production you start with a certain schema, like the one on the left, uh but over time things change, right?
Your upstream data might change, types might get widened, types might get added, types might get dropped. And so it is inevitable, and we see this all the time, that uh uh your schema might end up changing for your for your table. And in this world it's actually really painful for readers because readers don't actually know what the schema of the table is supposed to be. They are left having to piece together the schema of the table by reading all of the files and creating kind of this union of all of the columns that they find in all of the files.
And worse yet, in that world, what happens is a lot of these rows start missing uh values because the schema has updated and maybe they don't have the right values for those files. And so here, yet again, you're starting to sort of distrust the data a little bit. You're starting to say, "Hey, this table you know, I can query it and I always get the right I always get results, but we're missing values, uh the schema changes all the time.
I actually don't even know how to make sense of that." And so requirement number two. Twofold requirements. One is, you know, on write, when I'm writing to the table, it sure would be great if I could actually enforce what the schema should be. So if you're writing to a table, it better be in this schema, and if not, we're going to we're going to error out. And then secondly, we have to realize though that it is uh a common business need to update schemas.
Simplest example being maybe I started with a field that's an integer and now I need it long because I've sold too much cereal or have you. And so we need to make it possible, maybe maybe even easy in certain circumstances, to actually update our schema. Okay, let's keep going. What else do we need for this system? As it evolves, people are, you know, uh getting more trust in the data, they're using the data more. Well, one of the big requirements we haven't talked about is updating rows of the file.
So, all of our examples so far have been about adding more data into the table, but handling updates to existing rows or deletes of existing rows turns out to be super duper important. So, one of the, you know, canonical examples, of course, is GDPR deletes. Uh but, I think most of us have to handle those. So, I'm tracking, let's say, customer information in brick bites for each customer who purchases my cereal, and per their request, I have to either wipe away their rows or at least anonymize them.
And so, I need a way in this system to update rows. And in particular, I think one of the biggest wrinkles here is I've decided to use commodity cloud storage, and I have no regrets about that. But, one of the invariants in commodity cloud storage is that you actually can't update an existing file once you've written to it. You can only add more files. And so, how do we make this system performant and scale in a world where you can't even update the existing files that you've written? will talk about that more, but we're just making requirements for now.
To keep going, so now we're really cooking. We're making all these updates and deletes and merges. We're writing a lot to this table. People start trusting the data more. But, these tables are in constant flux, and sometimes I don't want that. Sometimes I actually just want a steady state of the world, or at least to go back in time to see what the table looked like in the past. To give two examples, one is auditing.
I might need to show to my auditors that at a particular point in time, the table looked like like this. Or separately, we hear this a lot from customers who are training ML models, where they just need a steady state of the world to train a model against, or to go back to the state of the world when they train the model, so that they can validate it, so that they can have something predictable. And so, it's really important as a requirement to be able to say, "Hey, query this table as of last week, or as of, you know, a few weeks ago."
Or even to restore the table back to that version if needed. So, that's time travel. Uh okay. And then, we're changing the table a bunch. We have time travel. We can go back in time, but with all these changes flying by, what if you have downstream systems that need to react to these changes? So, for example, my bronze level sales data is great, and it changes row by row by row, you know, hundreds of thousands of rows a day maybe.
But, downstream from that I have silver and gold tables that are you know, have aggregates on those, have additional processing on those. And when my bronze table changes, I realize well, I don't want to reprocess everything in those silver and gold tables. And so, what do I end up needing in those situations is a way to say, "Hey, for this table, just tell me what changed over a period of time. Just tell me what rows changed."
And so, there are uh many additional functional things we can pile on, and you know, we don't have time to actually cover all of the things that we need here. Uh but, I think the overall theme is with these requirements, they all stem from people trying to do fairly reasonable, fairly easy things in production. They realize they have a a challenge, and then we go and through engineering and innovation uh for these open table formats, they've actually uh evolved at the same time to solve the same problems.
But, the last thing I'll touch on here as far as defining requirements for our open table formats goes is not a new capability, but something that's arguably even more important. Right? And that is performance. So, at Brick Bites, we plan on selling a lot of cereal, and we plan on gathering data for a lot of Well, we plan on gathering a lot of data. And so, everything we talked about just now, it may be straightforward at small scales, you know, dealing with small tables, but we need to make sure that everything we build, everything every technology we take a dependency on, it scales to petabyte scale tables and billions of underlying files.
Imagine a table that is, you know, billions of files in the file system. Uh and also, you know, millions of writes as well. So, you know, hundreds of writes every minute. And so, we need a system that can scale to that. If not now, at least one that gives us the optionality to scale to that down the road. Okay? So, luckily, our open data formats, open table formats, Delta and Iceberg, they were born and designed and developed based on these requirements above.
So, this is not a hypothetical Well, these are not hypothetical requirements from some hypothetical breakfast cereal company. They are in fact, this is a fast forward through years of discussions with customers trying to solve these problems in production that gave birth to these requirements and then also to the systems that we'll learn about in a second. Um but, you know, instead of having to deal with all that pain yourself today and having to go through that iterative journey, what you can do at this very moment is uh create a table using Delta or using Iceberg and you will get all of the properties we talked about.
ACID, schema evolution, um incremental change processing, time travel, all that good stuff. And you'll get it all in commodity cloud storage. And in fact, you'll be able to it's self-contained in the file system itself. So, uh modern clients reading these table formats, all they have to do is be pointed to the file system and they're going to use just the information in the file system to be able to provide all of the capabilities we saw in this uh row of green check boxes there.
So, mission accomplished, right? We got all of that. Uh I have everything I need to help my teams. Well, not quite still. Because we have a few more challenges that we'll find out as we scale up even further. The first challenge is interoperability and governance. So, this is actually the same challenge that we kind of started with. Our first challenge was let's make sure these are open formats that everything that where we've disaggregated compute and storage and we can bring the right compute to the uh to the job.
And so, we've disaggregated storage from compute and these tables live in an open table format. Uh but, how do you these tools actually get access to the tables in cloud storage. Right? And the straw man historically is well, what you can do is you can give each tool storage level access. So, you can for example, provision an IAM role and give that to one of the tools and it hands hands over a credential to S3 and then it gets access to a directory where these tables live.
So, maybe a you know, a per table directory or something a little less fine-grained, but generally it's that concept. Give a table a give a tool directory access directly in storage. So, what could go wrong with that situation? Well, first off, giving each tool storage level access is painful and difficult to govern because for each user and for each tool, you need to provision some new access to storage. So, a user comes to you and says, "I need access from this new tool."
And you got to think about, "Well, do I provision a new credential? How do I hand that credential to the tool? How long does that credential live?" That kind of stuff. And secondly, it's difficult to audit because who is actually accessing all of my data in cloud storage? Well, what you have to do is you have to go to cloud storage logs. But cloud storage logs, they don't know about your tables. Uh they just know about files and folders.
And they don't necessarily know about your users either. They just know about the credentials with which they were handed. And so, going to storage level access logs feels like kind of using the wrong tool for the job. And furthermore, when you're pointing your clients to the directories where a table lives, that's also not great because first of all, not uh tables are not always directories, right? With Delta Lake, for example, if you shallow clone a table, it ends up living across two directories.
So, now do you give access to both? Um it's difficult. Or what if a table gets renamed and maybe you move it over to another directory or uh and then a new table gets created with its former name, now you may be giving access to something you didn't even mean to give access to. Or do you leave that table uh in this current directory, in which case the names in the uh in the directories don't match. It's kind of a headache either way, right?
It also means you can't give fine-grained access controls. So, if you want to prevent access to specific rows or columns within a table, it's difficult to do if the uh underlying clients have access to the whole directory with all the data. And then an overarching problem, how do you even discover what tables exist as a client? Do you just list through cloud storage and find all the directories and assume that those are all the tables?
Right? So, the bottom line is that this straw man, it can be cobbled together to work, and oftentimes people do do this, but it kind of starts feeling like the governance equivalent of the Parquet world that we had in the beginning. Where it does work, but it results in painful sharp edges and a mountain a mountain of maintenance burden that you have to go pay. So, uh first requirement here that we start to additionally lump on is what we would love to have an interoperability story where compute can discover and get access to the table and respect a single source of access control that knows about who has access to what and you can grant that and then can audit that, and then all of that using open standards.
Next, as we go through the problems, one of the other requirements we might end up having in a in a different dimension which ends up motivating the same solution is the is atomic transactions. So, here we've already seen the power of having atomic transactions on a single table. That's the ACID requirement we had for a single table that we started out with. But what if I need that across multiple tables? Right? Uh so, for example, I want to make sure that I'm merging into two tables, a sales and inventory table, whenever, let's say, I make a sale of my cereal, and in doing so, I want to make sure that's an atomic transaction as well, right?
They either both succeed or they both fail. And to do this, I can't just rely on self-contained tables within the file system. I need some kind of system that can coordinate across these tables and transactions. So, that's problem number two. First, governance. Second, multi-table transactions. And third, what about table optimizations? So, in this world, this is the third problem that motivates the same solution, also slightly different, very different from before.
So, with these modern table formats, there's the need and the opportunity for optimizations on performance uh based on how the data is laid out. So, think about the size of the files that make up the table. Uh too big or too small, you'll you'll see performance hits. Think about also the need to delete files that are no longer needed, which are outside of the time travel window. So, for these things, the problem starts off simple enough.
There are these optimizations that you can run. You can go clean up those files. You can go uh improve the file sizes for a table by table. But, what BrickByte, the company, will discover as they scale up is that this quickly becomes very complicated at scale. Because if you have thousands or hundreds of thousands of tables, which ones do you optimize at what time? So, here again, the thing that would seem simple, you just simply optimize these tables with some of these off-the-shelf commands, well, it becomes harder and harder at scale with production.
And so, if only there were a system that understood how these tables were being accessed and what tables existed, that could then automatically run these optimizations for me. And so, this motivates the open data catalog. And what we see here is uh the evolution of the open data catalog came to solve some of these requirements that were layered on top of open data formats, right? And so, first of all, if you have a catalog which exists above the table layer, it's not changing what's in storage.
Uh if you have a catalog that knows about your tables and can go access to tables, well, interoperability with governance is made much easier because clients can talk to the catalog first and it can they can discover what tables exist, what tables they have access to, and then from there they can be pointed to where to go in cloud storage to get the right files given their access. And catalogs these days can even grant you short-lived storage credentials.
So, you don't even have to worry about uh assigning credentials to the tool itself, the catalog can just take care of that. Secondly, if you want to make multi-statement transactions work, the catalog can serve as the coordinator across these tables. It can say it can make sure that the commits are hitting both of those tables in a transactional manner, and it can also coordinate readers to make sure that they're reading a consistent state of the world.
And then finally, for table optimizations as well, the catalog can handle this. It knows about all the reads and the writes, and so in doing so, they can automatically optimize the underlying tables. And so with this section, I hope this gives you a sense of the needs that the open table formats and catalogs were designed to address. And again, all of these were built based on the feedback of customers. As they unraveled the onion to have data at scale, they figured out they had these problems, and these technologies were were born to address those problems.
And so, with that, uh in my as a result of that, I'm happy Brick Bites is doing amazing, and uh we're ready to take our sales to the moon. So with that, you'll notice in my section I glossed over basically all of the how for how these formats actually work and exist. I just told you about the end requirements and the end solutions. And so I'll hand it over to, who'll talk about how these actually work. All right. Thanks, Siri.
So, let's see. We've talked through all of the requirements. We've basically built them from the ground up, all of the needs that you have. And ultimately, in in the current world, there's two open table formats for the lakehouse that have basically become central to this. Uh for a lot of organizations, Delta Lake and Apache Iceberg. And I'm basically going to do a little bit of a lecture now about how these formats work internally.
Of course, it's I can't go into every little detail, but I'll give you basically what you need to know to understand how these formats operate, what their constraints are, what they support, etc. So, let's start with this picture, right? So, you may have read stories online and you may end may end up thinking, like, there's Iceberg this, Delta that. You might think that they're just apples and oranges, right? clicker?
Yes. They are actually apples and apples. Slightly different color. Okay. Okay. But, apples and apples. And I'll run you through this over the course of the next section to show you how they're the same, the parts where they're slightly different, but ultimately uh how they really both satisfy all those requirements that Suresh just uh just presented to you. So, they did stem from different original use cases. So, they actually started off slightly differently.
Um but they've kind of converged over the years. So, let's start with the basics. The thing that all of these table formats have in common, table versions. So, both Delta and Iceberg uh track changes to a table using a concept called table versions. So, every change that you make to the table creates a new table version. And these versions are immutable. Now, that's a very fancy word, but it just means that once you've created a version, you can't change it anymore.
There's no takesies backsies. Once that thing is in the table, it's there. So, let's run through an example, right? So, you create a table and you create version one. That's your just the first version. And then you do an update. So, that creates version two. Or so, you do an Sorry, first one is an insert. Okay, then you do you create version two, then you do an update, that creates version three. Okay, so far so good.
Now, each version essentially represents the entire table as it was when that version was created. So, these versions are also preserved for a while, which means that you can actually time travel to older versions. So, for example, in this example, you you can ask like, what did my table look like at 1800 hours? So, as you can see, I've annotated the versions with their timestamps. So, you can figure out which version was the current version of the table at that particular time and then you find that it was Yes, version two.
So, now we can go back in time and we can read the table exactly as it was at that point in time. Voila, time travel. So, now we know that every one of these versions is essentially a whole version of the table, but of course, we don't make a full copy of the table every time. That would be super inefficient. So, let's let's look at how the data is stored. What is in a version? Well, for instance, version one would say, "I consist of these two parquet files."
So, it says A and B. parquet and accompanying that in cloud storage, like the blue thing on the right is supposed to be a cloud, um you actually have the physical parquet files that actually belong in there and that contains the actual row data. But that yellow box there is essentially the metadata that says, "This version consists of files A and B." Then an insert happens and that's version two and that adds a file C.
So, the table state at version two has files A, B, and C. And then finally, we have an update happening. And now, updates are a bit tricky because um Sorry mentioned this earlier, you can't actually update files in cloud storage because because yeah. Well, actually you can. You could theoretic- theoretically do that. Let's say that we want to update a row in file B, then we could overwrite file B with a new version where that row was updated, right?
We could do that. But because file B is referenced in version one and two, that would actually also retroactively modify those versions and that breaks time travel, right? Like your history is basically altered after the fact. Versions are supposed to be immutable. So, instead, what you do is you create a new file D that copies the contents of file B, but modifies just what you want. And you commit that to the table as version three.
Bingo. So, basically now we have a setup, an example with three versions. And okay. I'm going to do this throughout the presentation. We're going to do a comparison table between Delta Lake and Iceberg, what they have. So, let's start with these two things. Both of them have versions. In Delta Lake, they're called versions or commits. In Iceberg, they're called snapshot versions or snapshots. And in both, you can time travel by timestamp or by version number.
So, so far so good. Now we get into how versions are stored. So, um this is where Delta Lake and Iceberg are kind of different under the covers. So, let's take a look. Let's start with Delta Lake. So, in Delta Lake, not every version is fully stored, but instead every version stores the difference compared to the previous version. So, only the thing that changes. So, in this example, for instance, version two is different from version one because we added a new file.
So, it says add c. parquet. And in version three, we actually replaced file B with file D. So, we removed b. parquet. And we add d. parquet. So, those version files are actually called deltas. Deltas are a fancy name for just differences. So, that's actually where the name of the table format comes from. Delta is because it's a bunch of deltas stacked on top of each other. So, those deltas are actually stored also in cloud object storage.
So, as JSON files in a subdirectory of your table, and together, all of these files are called the Delta log, because it's essentially a logbook of all of the changes that happened to your table over time. this model has upsides and downsides. So, because we're just storing differences, and adding a new version is just a matter of writing one file, you can do pretty quick updates in Delta. So, you can you can do a lot of commits.
The downside is that reading can be kind of slower compared to if you stored the full version. Why? Well, because you have to actually replay all those versions to see what happens. And Delta Lake actually fixes this by adding a concept called checkpoints. See the green thing there on version three? That's a checkpoint. So, this checkpoint actually has a full roll up that has the complete contents of version three. So, now if you want to read version three, you don't have to look at the earlier versions.
You know exactly what is in that version. The version uh or sorry, the checkpoint is actually stored as a parquet file, which makes it a lot faster to read than those JSONs. And since these tables can be very large, they can have like a hundred million files in them or something, it's very important that you can kind of scan through these things fast. So, it's only natural that you would use the same format that you use for data, because that's optimized for scanning very quickly, right?
So, how do you read a table when it has checkpoints? Well, in this example, for instance, there's a checkpoint at version three. And let's say we want to read version six. In that case, we find the latest checkpoint before that version, which is three. And then you read and replay the differences after that. Which is, if my clicker would only work, it would show up. Yes, great. So, you basically read those and you don't need to read those other versions anymore.
So, as your table accumulates hundreds, thousands, millions of commits, that gets really important that you have those checkpoints. Okay. Now, let's move on to Iceberg. So, Iceberg also has versions, but it stores them very differently. So, Iceberg has a concept of snapshots. And every snapshot or version actually does have a full picture of the entire version. So, there's no storage of differences. So, the beginning of that journey is the table metadata.
So, the table metadata contains a list of snapshots that are currently in the table. So, that's the complete table history. And then that snapshot, there's currently only one in this example, it points at a manifest list. So, a manifest list is a separate file that contains again a list of pointers to other files called manifests. So, that's the final layer. There's a manifest here, and a manifest is an Avro file that contains a list of Parquet file names and other metadata about the files.
So, we've gone through three layers here. But, if we know that we want snapshot one, then we know it's A and B. Files A and B. That's it. Now, let's add a second version to this picture. So, now the table metadata has another version in it, snapshot number two. And if we want to do this, yes. In our earlier example, version two added parquet file C. So, we have to add a second manifest there called Y. We create a new manifest list that points at manifest X and Y.
And we point at that with the snapshot. So, now if you go through snapshot two, you see that it points at two manifests, and together they say this version contains files A, B, and C. Still with me? Again, we need a new manifest to make this work. In this case, we can't reuse manifest X because remember, in the third version of the table, we've removed parquet file B and we added parquet file D. So, in this case, manifest X contains parquet file B, so we can't reuse that.
Instead, we create a new manifest Z that contains file A and file D, which we replaced it with. And then we build this new manifest list from the bottom two manifests, which adds up to files A, C, and D, exactly what version three should be. So, this is how versions are tracked in Iceberg. And if you want to read snapshot three, for instance, you just start from the table meta metadata, you go through the manifest list, you find the manifests that gets you the set of files.
Now, oh, there's a question? Yeah, sorry. No question here, but So, is this when we're saying we're like deleting file B as you as you make your update, is that just the metadata that points to file B? Yes. And B remains in the source system. Yes. So, the question is, if we say delete file B, is that like deleting it from the file system, or is it just a metadata operation? It's just a metadata operation. Actually, the file stays around as long as you need it to time travel, and it ultimately needs to get cleaned up.
So, while you have these versions here around here, the files that you point at will stay around. You just no longer point at them. So, but if you time travel, you will still need them. Um Uh one more question, and then we'll have to move on. I guess on that, and so, if you were to do clean up the old snapshot to snapshot one, at that point, would the B. parquet get deleted? Um So, the question is, if we delete snapshot one, would the file then be deleted?
That's an implementation detail of how the vacuuming works. It It is possible to do it. Um There are also cases where it's not possible. Um Unfortunately, it's not possible to go into that level of detail in this in this presentation. But, uh yeah, it is a good question, and it's definitely a tough nut to crack. Um when when to delete those files. Um Anyway, one thing that I wanted to mention is that, as you note, uh the table metadata here contains a list of all the snapshots.
Well, in the Delta table, the list of versions that exist is just a set of files in the Delta log on the file system. So, that means that if a Delta table has 3 million versions, those just exist as files, but you don't need to know about them. You don't need to access them. In Iceberg, this actually is a very large list, potentially. Now, there are ways to optimize this um through help from a catalog, for instance, which might only serve a subset, but um in the in the basics, this table metadata, this this starting point is potentially very large over time.
So, as we've seen, both of these formats have their upsides and downsides in terms of scalability and performance. Um but ultimately, what do they do? They store versions. And they sometimes store full versions. Iceberg stores full versions always. Delta Lake only stores them every couple of commits, but ultimately, it boils down to the same thing. So, let's move on. How do you write to this? How do you change the table?
So, how does a new commit come into being? So, let's say that we have an events table. And we got the city wrong for Data and AI Summit. Sorry. And we want to update that. We want to set it back to San Francisco. So, we run this update command. So, what do you do? Well, you read the table metadata. You click the clicker. Ah. You read the table data. Um so, you read the table metadata uh where you Oh. Okay. You read the table metadata because you want to figure out what the table schema is.
What is the latest version of the table, what files are in there. So, then you go go ahead and read the table data um because you want to find that row that you want to update or multiple rows maybe. Then, you actually write new parquet files with the new updated rows. So, in the example that we had earlier, you might read file B that contains your record that you need to replace and you write file D with the updated rows.
Then, you collect those that set of files that you need to replace and the new files and you commit them to the table. Simple, right? So, this whole process in the middle, reading table data, writing new parquet files, that's more of an engine thing. It's not really a table format responsibility. So, we won't zoom into this. But, we will zoom into this last bit, committing to the table because that's relevant to the table format.
So, let's bring back ACID, right? So, we said it nicely. And I'm actually going to focus on a little bit of different properties here. Atomic, all or nothing. So, when you commit, either all your files appear in one go or they don't. And durable. Once it's committed, it should stay committed. Nobody gets to take your version. And consistency and isolation are covered in a kind of a different way. Isolation is covered in readers because most read jobs should actually read one consistent version of a table as they're reading.
So, that gives you isolation. It also gives you consistency because every transaction does an atomic update and creates a new version and every version is consistent because it's just something that you make sure of when you commit before you commit, that it's consistent, and that you're not doing something stupid. So, let's focus on these other properties and how this commit make makes that happen. So, let's start with Delta Lake classic commits.
And we have the old example again, right? Two versions here. Uh and we've already have We already have files A, B, and C in the table. And we want to add version three. So, we have these two files in the Delta log already. Number JSON files. Zero dot Sorry, one dot JSON and two dot JSON. So, all we have to do is write file three dot JSON, right? And we've committed. Um okay. Not so fast. It's sort of like that, but what if somebody else comes in and tries to do the same thing at the same time?
Like cloud object stores will happily just overwrite the files, right? So, you wrote your file and you think, "Yay, I've won. I've committed this this version three." So, you go back, you tell your your client or your engine tells the client, like, "Yay, I've committed this for you." And they go Oh, do all sort all sorts of things. And then somebody else comes and says, "Oh, no. No, you don't. I override it. I write file three."
And your commit is lost. That's not good. So, that's why the rule is we use this primitive called put if absent. So, cloud object stores provide this. S3 actually only added it last year, I think. But uh the other object storage systems actually provided it for much longer. Um what they do is basically they say, "We try to create this file and if it already exists, you fail." So, basically you try to commit. You say, "Please try this to write this file if it doesn't exist."
If you get back okay, then you won and everybody else will fail because the file already exists at that point, right? And that gives you durability. That gives you the guarantee that nobody actually claims your version three after you've already claimed it. And of course, because you're writing a single file, that means that your change is atomic. It's not halfway through or you can't like add half of the parquet files that were that you were adding.
You're always adding the whole thing. So now, let's get to Iceberg. So, this is the same example, but one thing I want to note is that the click. Yes. Um the table metadata is actually owned by something called an Iceberg catalog in Iceberg. So, Iceberg catalog is kind of an abstract concept, but the job of a catalog is to manage what is the current table version, what is the current table metadata, and it does all of these other things that mentioned, but mostly it it manages this table metadata.
And it can tell you what the current metadata is and it can update it. So, let's say that we want to add this new manifest list and commit it as snapshot version three, then we just go to the Iceberg catalog and ask it, "Please replace your table metadata by one with this extra snapshot, but only if it doesn't exist yet." So, all of this stuff is now managed by the catalog. The catalog controls that you can't actually create that version three twice from two different clients.
So, there are multiple catalog implementations for Iceberg. And uh there's actually a file system-based one as well, just like Delta. But the one that is kind of becoming the standard, and it's actually a standard from the Iceberg community itself, is the Iceberg REST catalog. So, it gives a REST API that's standardized. It's supported by many vendors, including Databricks Unity Catalog. And it it provides these basic features and a number of other features that we can't get into right now.
Uh but ultimately, this is an open standard that everybody can use to talk to catalogs and deal with their Iceberg tables and commit to them. So, what about Delta Lake? Does it have an equivalent of this? Well, yes, it does, but only as of well, now-ish. Uh this week, I think. So, um there's a concept of catalog owned tables that's been in the works. So, if your Delta table is catalog owned, then the catalog now manages the table version.
So, it gives you an API for getting the latest versions. It gives you an API for committing a version. Um and we will use this uh to actually handle Unity Catalog managed tables in the future. So, how does this work then? This changes the picture a little bit. So, instead of using put if absent, actually, we write a staged commit before that before we actually do the real commit. So, we write that file in a in a staged commit JSON.
And then we send a request to the catalog to say, "Please commit that file as version three." And now the catalog is responsible for saying, "Oh, yeah, nobody else committed version three yet, so sure. I'll do that for you." Um if somebody else did get there first, then tough luck. You're rejected. Uh but that gives you that durability, that guarantee that nobody gets there before you, or that you don't overwrite somebody else's version, etc.
Notice that the file isn't actually written as the 3. json immediately, so it stays in that staged location for a while, but it can be copied there asynchronously later, and that's all totally safe. As soon as the catalog says your commit has succeeded, it has succeeded. And it will just point readers at this staged file to see what's in the commit. So, let me just remind you why you want catalogs. Because isn't a file system-based commit system enough?
Well, for me the most compelling one the most compelling reason is actually transactions. So, being able to do a transaction across multiple tables is super powerful, and it's something that traditional OLTP databases have done for like tens of years, like since since the last century. And um yeah, they are now coming to these open lakehouse formats. And um so that's great. Uh, but there's also other reasons. So, you can do performance optimizations through your commits.
In theory, uh, a catalog could do commits without ever writing to disk and just doing that later. Um there's automatic table maintenance. There's automatic table optimization. Also, the catalog can see what you're doing, like when you're accessing the table, when you're writing to the table. So, it can automatically trigger downstream jobs or trigger replication for disaster recovery, or uh, just anything that you need to do that needs to be triggered when your data changes can be triggered with really low latency, because you know about it immediately.
You don't have to go and poll the file system to see if something changed. So, expanding the table, there will be many more versions of this table. So, um this was this was the versions and committing story. So, let's move on to um reading, because we've covered writing. Now, we we can write a new version to our table. So, how do you read? Well, let's say we want to read from this events table, and we want events between well, June 9th and June 12th, right?
It's a good week uh to check for events. So, you read the table metadata, you figure out what parquet files to read, and then you read the parquet files, right? Done. Well, okay. I said determine what parquet files to read. You're not done. No, because if you're just doing that, and that might just mean that you have to read the whole table. If your whole table is a petabyte, that's going to take a long time and a lot of compute.
And we just want a couple of rows. So, no, that's not going to fly. So, um what do we do? Well, we use the filters to skip files. So, the filter in this case is the event date is between June 9th and June 12th. So, let's say that we have these files in the table, a. c and d. parquet. So, let's look at a. parquet. We actually collect stats for each of the columns in the file that you might want to filter by, and we collect the minimum and the maximum value of that column in a parquet file.
So, in this example, a. parquet has event date stats, and the minimum value is January 3rd and the maximum value is August 3rd. So, if you look at our filter, we're looking for events with a date between June 9th and June 12th. That could definitely be in that file. So, yes, we do have to read that file. Now, look at c. parquet. That one has a min and a max that are both in March. Do we need to read that file? No, we don't.
And according to the same reasoning, we do have to read file d. parquet. So, if you look at this, this is actually not very good yet, right? We're reading two out of the three files. And that can be fixed because really what you want to do then is you want to cluster the data by those filter columns. So, that means that you write new files where each file contains similar values for the event date column. And one way to do this is to simply sort the data.
So, let's see what that does to our our example. So, I've sorted these these data entries into files e, f, and g and I've actually marked them with the filtering results. As you can see, e. parquet is January through March, then f is March through May, and g is May through August. Bingo. We only have to read that third file and it's much faster. So, there are actually a whole number of techniques for clustering your data for efficient access and I actually want to run you through them because it's kind of important for your daily practice um if you want to use these table formats and get them to perform.
So, the traditional one that people tend to use and that has existed for many years is what we call hive style partitioning. Um So, this is a very rigid form of data clustering. You basically specify a number of keys and all the data for one particular combination of values for those key columns, in this case event date and city, gets written to files by themselves. And you can't combine data from multiple combinations in one file.
And traditionally, this also gets written to directories separately. So, you basically have a directory for San Francisco on the on June 9th, etc. So, it's also rigid because data is immediately written in clustered form. So, if you're ingesting data that has lots of different value combinations, then you're writing lots of tiny files. And it's very easy to get this wrong and actually end up with tiny partitions and tiny files.
Um You you can't really uh partition by a timestamp column or something because you'd end up with a separate file for every timestamp in the world. Like, that's crazy. And if you've ever done that, you you will probably have regretted this. But, it's a common mistake. So, um and the worst thing is, after you created your table, you can't go back. You can't go fix this because it's unchangeable. Um the main upside that I can mention for this particular style of clustering is that it is supported by Delta Lake and Iceberg, both of them.
So, you always have it available. But, that's it. So, a little bit more flexible is a feature by Iceberg uh that's called partition evolution. So, you can actually change the partitioning after creating the table, and new data will then be written in this new partitioning layout. But, other than that, it's very similar to the existing Hive style partitioning that can't be changed. A little bit more flexible is sorting or Z-order clustering.
So, with sorting, you can imagine that you basically take your whole range of values, and you sort them, and then you just cut it at certain boundaries so that you get nice file sizes, right? Z-order is like that, but it's a little bit more advanced because it can actually do the same thing, but in multiple dimensions. So, you can sort by date and by city, or something like that, and it will just figure something out that makes it fit nicely.
Unfortunately, these solutions are not very incremental. Like, you can sort your data once, but then if you ingest new data, how do you incorporate that into your exist existing sorted data? That doesn't really work. So, when you want to actually bring your data back into sorted state, it often requires you to do a lot of rewrites for your data. And it's also not possible to immediately cluster your data when you write.
So, um yeah, this is not optimal yet. So, then that brings me to number four, liquid clustering. So, liquid clustering is very much like Z-order clustering, except that it's incremental, and on Databricks, it even supports immediate clustering on write or in on ingestion for larger ingestions. So, this is only supported by Delta for now, but um it's it's basically the fixed version of Z order. It's what Z order should have been uh from the get-go.
So, expanding the table once more, we'll get back to this. So, I I think you kind of got the picture from the way I presented this why I prefer particular choices of clustering methods, right? I I mean maybe I was too subtle. Uh but yeah, I I like liquid clustering. Um but I actually want to show you why because there's a lot of misconceptions about this. People don't fully understand what happens there. So, I actually want to show you.
So, let's start by showing you what's wrong with Hive style partitioning because you won't know what's good about liquid clustering un- until you know what's wrong with Hive style partitioning. So, um let's take this this example fact table. It's partitioned by customer and date. It might be a sales table or something. Um so, with Hive style partitioning, each uh partition contains files for one customer and date pair, right?
And some of these cells might be empty and uh the partition Each partition has like a different number of files, different size of files. So, um this is very sensitive to data skew. So, it's not very uniformly distributed. So, it's very hard to reason about what this does. So, I talked about having tiny files, right? Like where where you have uh very small partitions, but in a partition table, you can actually have both at the same time.
Like for instance, this whale customer here has enormous amounts of data for one partition. So, if you want to just query for 1 hour of data for that customer, like partitioning by date is actually not the right choice. You want by hour. And at the same time, if I want to read all of the data for this tiny customer, then I might be reading like 3,000 tiny files because these partitions only contain a very small amount of data.
So, and you you can't change this after the fact. So, if you've made this choice, you're stuck. Um but it's worse. Like if you're um if you're ingesting data incrementally, let's say once per hour, right? And every hour you ingest data for every customer. So, then every hour you create a tiny file in every partition. So, in this case, like in 24 hours, this whale customer builds up 24 files, but each of the other customers will actually also get that.
And so, each customer gets tiny files written to their partitions. So, your table gets out of shape really quickly. And that means that you frequently have to run these maintenance operations to actually bring your table back into shape. Now, liquid clustering, well, there's I'm sorry. Uh liquid clustering solves all this because it's it's self-tuning. It avoids all of this over- and under-partitioning, and it's incremental.
So, all your new data gets partially clustered, but it it sort of figures things out automatically to make things efficient. And if you want to change your clustering later, be my guest. It works. So, how would this handle the case that we just talked about? Well, so let's see. Let's say you have a small customer, right? So, you could actually have one file covering several dates at once. Or if you have a date that has data for multiple customers, but they're like tiny customers, then you can actually merge that into one file.
And then you can also combine those approaches and actually squash across multiple dimensions into one file. If the files are small, this makes sense. This is a good size file to read. If my clicker would only work, yes. Okay. So, you couldn't only you can choose to liquid cluster by timestamps instead of by dates. And then the system will actually automatically figure out the granularity to actually split things up by.
So, we had this example here of the whale customer having lots of data for one date. But you could actually split that up into a finer granularity if you had uh date uh or if you had timestamp instead of dates. And then actually if you ask for an hour of data, then maybe you're reading a file that contains 6 hours of data or 2 hours of data instead of the data for this entire day for this customer. And your results will come back much quicker.
We're not done yet. Now, remember how with the Hive style partitioning when you ingest data like hourly, you get lots of tiny files um one for each partition. Well, liquid clustering doesn't have to do that because the data doesn't have to follow any kind of rigid partitioning scheme. So, we'll just ingest the data into files of appropriate size for the entire day day initially. The data is small initially, so it doesn't really matter if you have to read that um if you want to scan that data as long as it's small.
But, as soon as the data becomes larger, it will actually start splitting it up. So, it might split it up a little like this. So, as the data accumulates, it essentially becomes more efficient. And later, the table maintenance will take care of the last bits and you have bingo, a very well clustered table. And the table was never in a bad state during this entire process. So, now you know why we recommend liquid clustering.
But, there's actually also this extra bonus feature that I want to show you, which is called cluster by auto. If you specify that on your table, actually this is for Unity Catalog managed tables only, it will actually figure out what the keys are that you need to cluster by. And it does this based on your workloads. And this is the power of the catalog, right? So, the catalog sees what you're doing, it sees your access patterns, and it can actually use uh a lot of information and combine that and sprinkle a bit of AI and simulations and uh all sorts of fun stuff on top to figure out exactly how to cluster this data to make your workloads the most efficient and the most cost efficient and the most performance efficient.
So, um that's the final reason and that really is the one that pushes it over the edge to be the uh the greatest solution for clustering. Oh, I have one more question. From the same guy. Yes. Uh so with the liquid clustering will you run into a situation with current writes to the same storage account in the same directory uh that you can get away from with Hive partitioning? Uh We we've run into a situation where Okay.
I can I can answer this question. Actually, uh it's not on the slides, but it's a very good question. The question is about do you run into issues when you have multiple writers writing to the same table and do they get rejected because you get concurrency conflicts where they modify the same data? Um so, actually, we've launched a new feature which is enabled automatically with liquid clustering called row-level concurrency, which solves this.
So, essentially, as long as your ingested your ingestion workloads don't touch the same rows, they will not conflict. So, you could even do merges like upserts from multiple sources as long as they don't touch the same keys, they won't conflict. They can just all complete. And you don't have to worry about this. And they can also run simultaneously with maintenance jobs. Um Okay, one more and then I have to continue.
Quick question. How painful is the uh migration from Z-ordering to liquid clustering? Uh Z-ordering to liquid clustering is just a matter of turning it on and it'll just start working. Um partitioning to liquid clustering, we haven't built the conversion yet. It's uh on our list on our wish list. So, um we have to move on and we're moving on to something completely different. Yeah, this is sort of there's lots of different aspects to these table formats and deletion vectors is the next one.
It's something completely different from what we've been talking about so far. So, um the problem we we did touch on it before, updating a single row, right? So, this is very slow because if you use simple parquet files, let's say we want to update that row in red. Um we got the year wrong of Data and AI Summit, stupid. So, we write a new parquet file B and we actually just copy over all the other rows and we correct that one row.
So, then we remove the old file A and we're done, right? We commit that to the table. Unfortunately, that old file A sticks around in the table for a while because of time travel. So, you're paying double the storage cost for a week and you paid the cost to actually copy all those rows and actually write that data, which is expensive. If you're doing scattered updates across all your table, updating a million rows across a million files, that's going to be very expensive.
So, the solution we built for this is called deletion vectors. So, instead of rewriting the entire file, we actually attach a little bit of metadata to that thing called a deletion vector that just says row number three is now deleted. Ignore it, please. And then we write a new parquet file B that contains only the replacement row for the row that we deleted. Nothing more. So, this is way more efficient. And ultimately, what it means is that the amount of data that you write, that you add to the table is just directly proportional to the amount of changes that you make, instead of dragging it along all of these extra changes that you're copying for no good reason.
So, how does how is this stored in the Delta log? Well, okay. Basically, what happens is we add the new file B, of course, and then we remove the file A that we had, and we add it back, but with an annotation saying delete row three. And then you can do another update where you actually do the same thing and remove another row, for instance. So, in this case, I removed rows three and five instead. So, you can keep removing rows from a from a Parquet file and keep on going like that.
Um And then I have to mention that this list of rows isn't actually stored in the log, it's stored in files on the side. They're compressed bitmaps. So, that's a very efficient storage, and so you can also go up to a million deleted rows or or 10 million, and it'll still work. Of course, at some point you need to complete to like compact them out and delete them, because if you have files with 90% deleted rows, it's not great.
But, um yeah, that's that's table maintenance. So, Iceberg also supports deletion vectors as of version three, which was ratified as a standard, I think, last week. So, um that's great, it's coming. Uh they already had something called position deletes, but it was very inefficient, and I don't want to go into it. Um they're actually deprecated as of Iceberg version three. So, um ultimately, this converges to the same solution and everybody's happy, right?
Um so, table gets updated. No need to dwell on this. Let's talk about table maintenance. So, table maintenance. So, why do you need to maintain your tables? Well, they degrade over time, right? So, you have these old versions piling up. Deleted rows must be cleaned up, like I just mentioned. You might also drop a column that needs to be cleaned up, especially if you have GDPR um applying to your data. Definitely important to clean up those deleted rows.
And you might also want to cluster your data. And there's also collecting up-to-date information for the optimizer, et cetera. All these things need to be done periodically, and you don't want to do that yourself, of course, but let's get to what it is first. So, thing number one is garbage collection. This was mentioned before. So, basically, the old versions of the table at some point go out of your time travel window.
So, for instance, versions one and two are now gone. So, you're left with version three. Um but the cloud object store, the parquet files, still contains all of the files that were originally there. Now, if you look at the set of files that are currently referenced, B is no longer there. So, we can hopefully, mark that as deleted and make it go away. Yes. So, um So, this is basically garbage collection, and both Delta Lake and Iceberg have have this.
It's called vacuuming in Delta Lake, and Iceberg has these other separate um commands that you can invoke. Uh read the documentation if you want to want to know how. Um Then, number two is deleted rows. You want to clean up those rows that were deleted. So, you basically take the A park A. parquet that has a row deleted using a deletion vector, write a new file C that has the deleted rows removed. So, you want to do that uh periodically.
So, Delta Lake and Iceberg both have commands to do this. Data layout. Um compacting files, uh restoring clustering, both Delta and Iceberg have this. Um There's more commands like computing statistics for the query optimizer, very important for your performance. You should do it. Or you should let the catalog do it. Um So, this gets us to automation because there's just so much stuff to maintain about tables and um I think some people vacuum their tables, not even all people vacuum their tables.
You should. Um optimizing your tables, you should. Analyzing them for optimizer statistics, you should. But, there's only so much time in a day, right? So, that's why we built this thing called predictive optimization. This is a feature of Unity Catalog where managed tables will be maintained automatically when necessary based on your workloads, and it will basically run all of these commands exactly when needed to um well, to bring your tables back to a good state whenever it's necessary.
But, of course, if a table doesn't get any traffic, if nobody writes to it, why would you run vacuum? Why would you optimize it, etc. So, there's actually value in having the catalog knowing about what's happening to your table. And uh and that's why we can figure this stuff out and the cluster by auto stuff as well. So, um this is available for Unity catalog managed tables. Um Iceberg catalogs frequently also provide this kind of maintenance, not the not the automatic clustering usually, but more basic table maintenance like the garbage collection stuff is usually in there.
So, extending the table again, but let's move on in the interest of time. So, there's I think I have two more subjects on the agenda before I hand it. The first of that is change tracking. So, if this thing will click. Yes. So, change tracking. Um what is change tracking? Well, basically, you want to be able to know what changed on a table from version to version. And why would you want this? Well, you have streaming applications where you stream the data into a downstream table.
You want to do efficient materialized view updates. Maybe you want to do auditing on your table to see what changed and who changed it when, or debug why your pipeline isn't working or what's not working about it. So, in Delta Lake, we built a feature that actually stores this change data explicitly with every transaction. So, in the log, we actually have this extra thing called a CDF file. So, we actually write the changes to a separate parquet file.
Iceberg actually takes a different approach. It actually requires you to call a function that then calculates the difference between versions for you. So, these are very different approaches. Uh the Delta Lake approach is very read optimized, so it's faster read, but it's slow to write. And Iceberg is slow to read, but faster write. So, um it has some It has some trade-offs here. I want to call out one thing here. Uh for the Iceberg one, you actually have to provide an identifier column.
So, this is like a like the primary key of your table, right? You have to tell it what that is. And why is that? Well, I think I might have skipped the original slide that has this table because of the clicker. Um so, you'll you'll have to bear with me. This is actually the set of changes that you might see if you ask for the differences. So, you might you might see the top two rows say that there's an update to a particular row in commit version three.
The third row says that there's an insert happened in version four, and it gives you all the values that were inserted. And the last row says that there was a delete happened in commit version five. The point that I was trying to make is that the only thing that is telling you that these first two rows were an update is actually the fact that they happened to a row with the same ID. Right? So, Iceberg uses this to figure out that it's an update.
If you didn't have this, then this would look like just an insert and a delete. So, if you don't care about the difference between updates and inserts and deletes, then you don't care. But if you do, then you have to actually have an ID. But that means that every table needs a primary key. Do all of your uh time series fact tables have primary keys? Um mine don't. So, like timestamps aren't unique. So, you don't always have this, and you don't want to think about it.
So, this is why we built something called row tracking. Essentially, every row gets a unique ID automatically. And that means that you can calculate the CDC data automatically without having to specify uh primary keys. And now this is not supported in Delta Lake yet to actually use this to calculate CDC. This is coming soon. But um it's all prepared for it. Um Iceberg V3 also adopted this row tracking feature under the name row lineage.
So, again, converging. And they will also be supporting calculation of CDC streams using this information. So, table grows, but we're not done. Last subject, schema changes. I know, this is sort of a laundry list, right? But there's just so much to these table formats and it is a deep dive. So, I'm going to finish this one and then I'm going to let you uh finish up with Sri. So, schemas well, table table schemas just evolve over time.
You might want to add a new column, you might want to rename a column, drop a column, change a column's type. And for instance, you might be ingesting data from some source that changes over time, some upstream database or some uh some event stream JSON coming in with random fields. So, there's lots of reasons why you might want this. So, what happens in both Delta Lake and Iceberg is that every version of the table has its own schema.
So, you might start off with an event ID and event column in your schema. Then you rename a column because you figure out, oh, event is not a good name for the for the event name column. It should be named event name. So, you rename it. So, the next version basically gets in the version, it stores just that it has a different schema. And then maybe you figure out that you have so many events that an integer of 32 bits is not large enough to hold all those IDs.
So, you upgrade that to a big integer, 64 bits. And that's the next uh next version of the table. So, all of those things are possible. But now, I want to show you how that actually works. So, a rename, like the Parquet file actually also has a schema. Each Parquet file is self-describing. So, it actually has that name event in there. So, what happens if I take that schema and I actually change the name in that schema to event name?
Will the system try to read event name from this Parquet file and say like, "Hey, I don't have that. I'll return you all nulls or something." No. Uh what we do is we actually rename the column logically, and then we store the physical name behind it. So, we say the user refers to this as event name, but when we read the Parquet file, we read event. And going forward even when we write new Parquet files, we'll also just write it as event because that's the physical name of this column.
So, that's how it works in Delta Lake. In Iceberg, it's slightly different. They actually use IDs for the columns that identify them in the Parquet files, but the principle is the same. Delta Lake also supports that ID mode. So, convergence again. Now, as a final thing, let's look at the uh widening of the event ID column to big end. That doesn't actually require any changes because it's just a widening. You read the event ID from the parquet file and it's still a 32-bit integer.
So, you figure, "Okay, I want big end. It's end. Fine, I'll just widen it." And done. So, there's actually not not a big deal here. We did actually have to port that to all the parquet readers out there to actually do that. But once we did that, it worked pretty fine and actually um yeah, Delta and Iceberg both benefit from this feature now. So, you can widen types in both those uh formats. To make things easier, both formats can also automatically evolve your schemas when you ingest new data so that you can do this worry-free.
So, um they can automatically add fields and they can automatically widen field types if the data doesn't fit. So, this basically avoids breaking your ingestion pipelines. Uh so, changing schemas can become a very normal thing when you use these open lakehouse formats and it just becomes a standard thing that everything just handles and you don't worry about it. I think that's actually the end of this part. So, it was a a long section with a lot of different topics, as you can see.
And the big picture is it's actually all green check boxes. So, at the beginning when you came into this talk, did you think that it would be all green check boxes? No. But it is. And of course, there are subtle differences, but um actually, there's more similarities than differences. So, with that, I'm going to hand the back the mic. And he will talk to you about the future. Ooh. All right. Actually, I'm going to take us home.
I'm also going to use the keyboard to avoid using what's apparently the worst clicker of all time. Uh all right, so thanks. So, to wrap things up, we saw how Well, one of my favorite parts about these open table formats and catalogs is that despite all of the complexity you saw underneath the covers that just talked about, all of that is actually largely obfuscated from you as the user, right? If if you're using open table format with an open data catalog, all you have to do is create a table and you know, write your mergers or deletes or updates or inserts, and you get all of this stuff underneath the covers.
So, but we saw how we get all of that stuff underneath the covers through lecture just now. And I think thanks to these innovations, the adoption of these open table formats has been just really staggering. So, even just inside Databricks, I pulled the numbers right before this talk, we are processing many exabytes a day, tens of exabytes a day just on our platform. Our largest tables are tens of petabytes spanning hundreds of millions of files, and that's just in Databricks, right?
If you look at the broader community as well, basically all of the players in the space are embracing open table formats. And so, it's really been a I think I think a big revolution in the space. So, what's left? Well, we have one more problem, one more thing that should have been easy, but is actually hard. Uh can you guess what it is? Well, it's the fact that there's two formats. So, which open table format to use, right?
Coming back to this problem of what seems to be easy and becomes hard. Well, I just want to ingest to a table, I just want to disaggregate storage and compute, but now what do I have to do a bake-off between Delta and Iceberg? Do I have to understand the subtle nuances and the differences in the ecosystem and and all of that? Which one supports that? Which one uh supports the other? Well, to that I have to say, remember as went through this table, they're all green check marks uh check boxes.
They all sounded pretty similar. And they're so similar that often when explaining the concepts for how one works, pretty much explained how the other one works modulo some nuances. And recall that even with Iceberg V3, we had deletion vectors which align the implementations between Delta and Iceberg. We also have row lineage, which matches uh in both formats. And so, what does the future uh hold in store here for our open table formats?
And what can we do to make the difficult task of choosing the formats much simpler? Well, for that, I'm actually going to have to leave you on a cliffhanger for today. Uh but, stay tuned. The future is close. Specifically, it's Thursday. So, uh stay tuned for the keynote, especially Matei's section on Unity Catalog and interoperability. And then also check out these two talks, which will basically continue the story from here.
The first one is about the future of open table formats by Ryan Blue and Daniel Weeks, two of the co-founders of Tabular and co-creators of Iceberg who work at Databricks. And then secondly, uh the second one there, I won't read the title, but it's about how this all fits into Unity Catalog and Databricks managed tables. And so, with that, uh we'll end the talk here. But, the good news is you all have the context and background needed to appreciate the announcements coming up soon and to understand the foundations of open table formats and catalogs.
And with that, thank you so much and have a good rest of your conference.

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.