Hello, my fair-weathered friends and readers! I am gone on vacation this week with my family, probably at this moment lying in the sand on a beach (Lord willing the creek don’t rise), not thinking of you all. Anywho, be that as it may, I didn’t want you to miss my pretty face, so here is a video of me ranting about Apache Iceberg, something I’ve had a lot of practice doing and enjoy quite thoroughly. For all you free-loaders out there, you can get 20% off to celebrate Memorial Day. https://dataengineeringcentral.substack.com/Merica This is a public episode. If you'd like to discuss this with other subscribers or get access to bonus episodes, visit dataengineeringcentral.substack.com/subscribe
Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.
Transcript
From the show. Tap a time to play from there.
Thank you.
SPEAKER_00I mean, y'all ain't going to believe this. This is crazy, man. Who would have thought? AWS couldn't do it. All these other companies couldn't do it. Apache Iceberg everywhere. Come use our sort of open source iceberg, sort of not open source iceberg. I don't know. One of the biggest annoyances with Apache Iceberg is trying to use a flipping catalog that works. You know what your two options are? Your options are, oh, I'm going to run this on my laptop and I guess I'm just going to use SQLite locally and that's my catalog well that doesn't do anyone any good that's
not a production use case okay it doesn't work in a cloud or at least i haven't seen anyone try to do it and whatever or hey go install like i don't know lake keeper all this other crap that's like hey just spin up some servers you know and install this crap and now you have a catalog who wants to do that to use a flipping lake house format i have
SPEAKER_00to run something on a server and like manage it what the crap i don't know that just drove me crazy about iceberg and all the production use cases just you need an easy to use catalog you can't be using flipping sqlite it's just a big barrier to iceberg always has been and today someone solved it finally I can't believe it. You know, you got all these companies that want to use this open source Apache Iceberg format for their own good,
SPEAKER_00I guess. Right. They want to lot it. They want to say it's best. We support it. All this crap. But nobody wants to actually make Iceberg work in the open source for real until some dude comes along and says, well, I guess I'll just have to fix it. And that's exactly what happened. I mean, honestly, this is the only beam of light in a dark tunnel of despair of Apache Iceberg in production since Cloudflare's wonderful R2 data catalog, which has basically been ignored by everyone for some reason. And God bless that Julian, man.
SPEAKER_00You guys got to go check him out on... linkedin or wherever you can find him his Substack but he just released a new boring apache iceberg catalog and by board that's the name of it okay it's not boring it's the name of it it's called the boring catalog and it is a file-based cloud compliant aks3 apache iceberg catalog wow who would have thought they could do it apparently aws can't do it you know this couldn't be bothered they can take advantage of iceberg that's about it so thanks to julian for single-handedly saving
the patchy iceberg data engineering community because apparently that's what has to happen anyways if we head over to the github here it is the boring catalog it is a lightweight file-based iceberg catalog implementation using a single json file you can use it on local disk on s3 or any fs spec compatible storage awesome where has this been for the last three years i'm not you know julian's the best but everyone else what
SPEAKER_00the crap man i'm sure some of you unbelievers and little whiners who's never actually tried apache iceberg in a cloud-like production environment will say the very simperina but we've had sequel like catalogs for iceberg forever we have a rest catalog you know what i've tried setting up and using some of the biggest and best rest catalogs and it's like number one they didn't work go read my crap and you go try it Number two, I don't want a flipping run in a server just to host a catalog
so I can write to
SPEAKER_00Iceberg. Give me a break. Apache Iceberg catalogs are in desperate need of easy to use implementations and implementations that don't need Google scale or a server to run and that they work in the cloud. That's what we need. What we needed was a first step that is a viable catalog that works in the cloud without major setup which can support 80% of the use cases for small to medium-sized data teams that want to use Iceberg. Most people aren't crunching petabytes of data with thousands of workers and they need some high-performance Apache Iceberg catalog.
SPEAKER_00It's not most people, okay? That's just the reality. So what I did is I kicked the tires on Born Catalog. I was like, is this too good to be? There's no way. AWS couldn't do it. Nobody else can do it. That's taking advantage of Iceberg. How could this one dude just like do this? Is it possible? Can this actually work? That's what I wanted to find out. Spoiler, it does work. So basically, I'm going to go through this really quick and easy. You could do this using UV. UVInitBoringIceberg. UVAddPyIcebergDuckDBPolarsBoringCatalog.
SPEAKER_00Let's go, man. Create the virtual environment. Oh, ran into a problem. The first one was, hey, you got to have an earlier version of Python. 3.9 is too old, so I upgraded to Python 3.11. By the way, the author of this, you know, I sent this stuff I did over to this guy, and he fixed this already. What an amazing dude. anyways i use you got to use at least 3.10 it sounds like you fix that up whatever uv init boring iceberg python 3.11 go ahead and uv add pi iceberg ducty bipolars boring catalog pretty much like any other catalog iceberg
catalog and any other
SPEAKER_00catalog for that matter in our case we need to set up a warehouse for that iceberg catalog and we're located somewhere in s3 so i went ahead and in my uv environment i went and activated that environment and said i once you pip install boring catalog by the way you get a command line tool called ice ice init dash p warehouse equals and i just put in confessions of a data guy bing bong ding dong that's where i want my catalog at or that's what my warehouse at go to town Okay, had a little bit of an error. Access denied.
SPEAKER_00I figured this might happen. I got multiple profiles. And of course, this tool, if I said ICE help, it didn't really give me the chance to say, hey, use this profile. But I figured, hey, if I export my AWS keys and stuff into the environment, I bet I could do it, which I did. I exported my keys. You can see there. Went ahead and ICE in it. That same thing. Confessions out of the data guide. Bing, bong, ding, dong. and look at that initialize the catalog at that location here's the catalog location here's the warehouse location catalog name wow easy it
actually worked man that's good stuff but is if it's working we should be able to write some python now and see what happens can we create a table in s3 using this super simple iceberg
SPEAKER_00catalog that's a file in s3 Dear Lord, here we go. We'll use pollers from Boring Catalog import. Boring Catalog. Export my keys. Catalog equals Boring Catalog name. Bing bong, ding dong. Here's the URL. Point it right there, baby. Right at that JSON file. let's go ahead and read our divi bike trips data set with polars polars read csv to arrow give us that dirty old arrow data frame catalog create namespace pickles
because why not everybody loves pickles catalog create table pickles trip data schema here's the data dot schema from our py arrow table catalog catalog so we
SPEAKER_00create the table catalog load table pickles trip data Dear Lord, that was so easy and it worked. It almost reminds me of Delta Lake. Okay, I lied. It did break the very first time I ran that exact code. It said, hey, I don't know where the location is for this table, which I thought was strange. It's a brand new thing, whatever. Went and looked at the docs. Hey. The table location is optional in the source code. Like, I can get past this. I can pass the location, brother. I know all about it. So either way, I just went back to that code,
SPEAKER_00said catalog, create table, identifier, pickles, trip data, schema, schema, location, and just gave it the location of my warehouse and just said, hey, write the tables there. but now we want to see if this really works with something else does it work with polars polars supports writing to iceberg from a data frame so we should be able to do this with this catalog here's the code it's amazing again imports keys for aws
SPEAKER_00catalog we load that catalog again like there's no tomorrow We take polars, we read that CSV, we take the table, the catalog, say dot load table, pickles, data trip, and then we say data, which is our data from polars, write iceberg, pass it the table from the catalog, and mode append. Holy crap, it's like we're using Delta Lake or something. Here's the code that I wrote to read it back to prove that it works. Super simple with that catalog. Man, boring catalog is the best.
SPEAKER_00Print the table. Load the table. Print the table. Scan to arrow. Dude, look at that. It flipping worked. That is unbelievable. I have to take a minute here, though. What in the world is going on? Riddle me this. Why is it that it took a lone data engineer wandering in this broken data landscape this far into the patchy iceberg being around, which has been forever. People have been lauding it forever. How did it take one dude to write a simple to use cloud compliant catalog that actually works? And maybe it's just because I've spent too much time trying to
make all these other
SPEAKER_00tables work that don't. Maybe it's me seeing all these major companies like AWS and S3 tables, all these other places saying, hey, we're iceberg compliant. We use it, blah, blah, blah, in our own little way or secret way. Use our tool. they all just want to abuse the open source apache iceberg nobody wants to actually step up like julian and actually write something that is actually awesome and will work i don't know how long it took him but it's just ridiculous that it took this long for somebody to do this because honestly this has been whether people like it
SPEAKER_00or not This has been a big barrier and an Achille heels of Apache Iceberg. I mean, this is a realistic cloud-enabled iceberg catalog that you could use truly in an open source and production environment. I just did it with a few lines of code. i mean it's so predictable that all the talking heads and companies that want to take advantage of iceberg wouldn't do this and not put developers first and yet it took someone just out of nowhere finally after all this years
to provide a real simple workable catalog option that works in open source in the cloud i don't know apache iceberg community at large needs to take a note from the page of databricks
SPEAKER_00and delta lake like it or not You know, they have put open source usability and developer first when it comes to Delta Lake. It has first class support for a reason. It shows in the usage and in their product. Man, I highly suggest you guys send a thank you note to Julian. Go find him, follow him on LinkedIn, check out his sub stack. It's here. I'll put a link in it to Jude Data Engineering Newsletter. Man, this guy deserves your thanks for basically carrying Apache Iceberg on his shoulders.
What happens to software engineers when AI can write most of the code? In this episode of the Data Engineering Central Podcast, I sit down with Gregor Ojstersek, former CTO, author of The Multiplier Mindset (O’Reilly),...
What happens when you finally achieve financial independence, walk away from a successful career in Big Tech, and have the freedom to do whatever you want? Is it everything you imagined it would be? In this episode of...
What does it actually take to build AI systems that work in production? In this episode of Data Engineering Central, I sit down with Maria Vechtomova, AI Engineering Lead, co-founder of CAUCHY, Databricks MVP, and...
I sat down with Erfan Hesami, founder of Pipeline to Insights, to talk about where data engineering is headed as AI and agents become part of everyday engineering work. We dig into the changing role of the data...
What happens when you spend decades building a successful career in tech, finally reach Big Tech, and then suddenly get laid off? In this episode of the Data Engineering Central Podcast, I sit down with AsianDadEnergy...