Skip to content
PodSubs
ShowsPeopleGuestsJobsNewsEvents
More
BlogPodCred
Menu
ShowsPeopleGuestsJobsNewsEventsBlogPodCredNetworksSign in
Join nowSign in
  • Shows
  • People
  • Jobs
  • News
  • More
    • Guests
    • Events
    • Blog
    • PodCred
    • Networks
    Join nowSign in

Data Engineering Central Podcast

Data Engineering Central Podcast artwork

Data Engineering Central Podcast - 02

Oct 4, 202423 minAudio
ShareXLinkedInFacebookWhatsAppEmail

Welcome to the Data Engineering Central Podcast - - a no-holds-barred discussion on the Data Landscape. Welcome to Episode 02 In today’s episode, we will talk about the following topics from the Data Engineering perspective … * Using OpenAI’s o1 Model to do Data Engineering work * Lord Save us from more ETL tools * Rust for the small things * Hosted (SaaS) vs Build 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.

SPEAKER_00Welcome to the Data Engineering Central podcast. I'm Daniel Beach, your host. On this podcast, we talk all things data engineering and data. This is episode two and we're going to talk about a few topics today. They are using OpenAI's O1 model to do data engineering work. I did some work around that and we'll talk about that, how that turned out. We're going to talk about Lord save us from more ETL tools, just the overwhelming amount of ETL tools out there. Also talk about using Rust for small things and then we'll quickly cover hosted

SPEAKER_00The first topic I want to cover is an article I wrote about using OpenAI slash chat GPT's 01 model to do PostgreSQL basics. Just with all the hufflepuff around there about AI replacing programmers and all that kind of stuff. It's a joke and I just kind of wanted to show people that by using this. But also at the same time... I wanted to show people that you should probably be using AI in your workflows. I think it makes sense. It makes me a more efficient developer and data engineer, and it's probably the same for you.

SPEAKER_00I don't know if you follow all the new AI model stuff, but the new 01 OpenAI model, it apparently blows the socks off of most previous models, including 4.0, when it comes to programming and other benchmarks, which has kind of got me curious as someone who uses AI copilot, et cetera. And I use chat GDP also in my, you know, daily dev life cycle just to make me a little bit more efficient. And I kind of like using it. Um, but I don't, but at the same time, I don't think that it's going to replace me anytime soon. It's just simply not good enough.

SPEAKER_00And it's a long ways from being good enough. Um, So I've been kind of trying to ride down the middle of the tracks when it comes to AI and programming. I mean, I've been doing code and doing data engineer long enough to see the obvious flaws in the current AI models. But I've also embraced AI into my development lifecycle for probably about two years or so. And it's kind of left me pessimistically optimistic if there is such a thing. I picked a task that seemed kind of like sort of outside the box yet simple enough that it is what I would consider a basic data engineering task, something I would give to a junior data engineer and expect them to be able to do.

SPEAKER_00Basically what it came down to is I wanted to treat this new 01 model from OpenAI kind of like I would a junior data engineer. I'm going to pretend we're having a performance problem with PostgreSQL. And I need a junior engineer to set up an end-to-end test to prove what the fix should be. So not only does it need to come up with some ideas how to fix a problem, it needs to be able to kind of prove that out. Because I would expect that of an engineer. You can't just willy-nilly try things. If you're going to put something in production, you need to test it out and prove and say, hey, this answer is the right one. And so I'm going to walk through the problem that I had 01 work on.

SPEAKER_00It's actually based on an actual real-life problem I recently fixed with Postgres. And it kind of has two purposes. Can OpenAI 01s solve a query performance issue with Postgres without me telling it what the solution is? And once the model's on the right track and I think it's giving me a good answer, can it help me create an end-to-end test? Can it help me prove out what's going on? Basically, the problem that I had fixed was an update performance issue. It's pretty common in Postgres, right?

SPEAKER_00You got some update statement that's taking hours and hours, and that's kind of all you know. And basically, could I give the model the DDL for the update statement or the DML, I should say, for the update statement and then the DDL for the tables involved and kind of give an idea of records and things. And would it, you know, come up an idea of like, this is how you could fix the update performance on the SQL query. I mean, Postgres has been around forever. Performance problems on these have been around forever. So I would assume based on the data it's trained on,

SPEAKER_00this model could do a pretty good job of saying this is what you need to do to fix the problem. And my real life use case, there is, you know, a table with like 200 million plus records. So I kind of wanted to also at the same time, the model to be able to come up with some tests that kind of, you know, was able to, I wanted the model to come up with a test that's kind of able to, you know, mirror that and we could set it up and run things and test it without testing and production. So basically what I did was I asked this question. I said, this is the prompt I put in for this model. I said, we have a Postgres SQL table that's been running a slow update statement.

SPEAKER_00The following is the DDL of the table. Also provided is the update statement. Can you suggest any fixes to help with performance? And I know this is a podcast, but you can't see the DDL, but basically there's a customer info table, you know, an id that's a primary key it's auto generated the customer id customer name address city postal state country last activity and the total number of orders you know very basic customer table and then it didn't have any indexes right just the primary key of the id the auto generated and then i gave the update statement below

SPEAKER_00which is basically updating that customer info table i just told you about from a temp table that has the same layout as the table I just described. But, you know, it's basically what's happening was the data frames coming in to the database and creating this temp table, shoving basically the same records in it. And then what's happening is there's an update saying, Basically, between these two tables, joining on customer ID and where the last activity date of that table equals the current date.

SPEAKER_00And that was updating the address of city, postal, state, and country for that table. So again, two tables, a bunch of customer information. One's the temp table, one's the table that's always there. The join is between the customer ID and we're getting the records out of the temp table where the last activity date for that customer is now and then we're updating you know some stuff about that customer in the primary table like address city state you know it's a very straightforward problem one thing that was interesting when it came to the 01 model response for this it was i

SPEAKER_00didn't even know where to start it was a large and intense i mean it was huge i did a youtube video about this you could probably go check it out But it had a ton of recommendations. It had 10 recommendations that came. It said index it. The first one, which I was hoping it would say, was adding indexes on customer IDs on both tables and on last activity date in the temp table. But it did give us more specific instructions when it talked about adding indexes. It gave, you know, kind of like here's what you should do. And it said add indexes on join and filter columns, which is what I was hoping it would do.

SPEAKER_00It said add an index on the customer ID column. Since you're joining customer info and temp table on customer ID, it said, you know, add an index on this column can significantly speed the lookup. I'm glad it did that. And it gave an actual, you know, create statement for the index to create on both tables, of course, the temp table and the main table. which is good and it also added a last activity date index on the temp table because remember part of that update was like hey only update it where the last activity date from this temp table is now right but that you know okay it answered

SPEAKER_00that question pretty easily i mean i guess if you're a junior engineer and you've not done much tuning and you're not working postgres much i guess this would give you a pretty good idea so you know it's a good thing But also, remember, I also asked it to help me with the testing, right? I need to be able to test this out and prove that it works. So I actually added a number prompt and I said, I need you to write a Python script that will generate 200 million records for the customer table we've been working with. And it pumped out a script to do that. Obviously, you can't see that script in the podcast, but it's a pretty simple script in Python.

SPEAKER_00There's not much to say about it. It just basically generates a bunch of fake data and then just inserts it for the range, for the 200 million. Basically what ended up happening was that it was a very slow query, a very slow suggestion it gave. Basically the code was not very good that it gave out. It took about 24 hours to insert 100 million records so it was a very poor script. So that was one note of mine I had about the model. It surprisingly couldn't figure out how to write a script that could generate 200

SPEAKER_00million records worth of fake data in a performant manner. I only got about 100 million before I had to shut it down. So I went ahead and it created both tables in my test database so I could test what it's telling me to do. I ran the statement to generate the records, the 100 million records in the primary table. And then basically what I did is I just selected the top 6 million records from that main table and I copied it over into the temp table.

SPEAKER_00So... And I actually ran that same update statement that I talked about in the beginning without the indexes. So just to see what the performance was. And it's about two minutes without the indexes that this 01 model from AI was telling me to add. So then I went ahead and added those indexes right on the customer ID and the last activity date. I checked that table and got the last activity. I just picked a random date from that and it was about 8,000 records or so that would actually be updated if that makes sense.

SPEAKER_00Just so you know. And then with the indexes added, it took about eight seconds to run the update. That is a big difference. So it did look like in the end OpenAI's model 01 model came through for us. It basically cut the query down from two minutes to eight seconds with its suggestion of adding indexes and helping me test that. Not bad. When I think about what I proved or didn't prove that new open AI model, it's pretty much the same as what I would expect. It was pretty much at least at a junior level data engineer.

SPEAKER_00I think I was a little disappointed that it wrote a very unscalable script to generate a few hundred million fake records. Cause that's not a big deal, but that's not surprising again, based on my experience. And again, my takeaway is still, I don't think AI will take any good data engineers job anytime soon. You know, the newer AI models can probably solve most problems as well as any junior data engineer. That's kind of fresh. You know, I did a little poll asking people if they use AI in their workflow and surprisingly, almost 90%, 87% of people said,

SPEAKER_00yes, they do. And only 13% said, no, this is very interesting. That means most people like me, they're starting to use AI in our workflow. the next topic i wanted to talk about is kind of a fun one it'll be a short one basically it's lord save us not another etl tool please just what we need another one i mean just when you think you can't take it anymore not even a single one not another one pop there comes another etl tool it's crazy that's what it feels like with etl tools these days it's constant i mean

SPEAKER_00Reverse ETL streaming, low code, no code. I mean, it's just, it's incredible the amount of ETL tools that continue to come out of the modern data stack even to this day. I mean, isn't it just a classic engineering problem that we would rather just build the wheel over and over again for the 50th of time rather than use something that already exists? I mean, we love creating things, writing code, and that is happening now. There's no-code, low-code tooling. There's streaming tooling. There's batch tooling. There's DevOps and CICD tooling. There's tooling from your cloud providers that they give to you. There's tooling to monitor your other tooling, right?

SPEAKER_00There's costing tooling, tooling to manage your code, analytics tooling, faster query times tooling. I mean, it just goes on forever. I mean, some of it to me is probably one of the reasons why we've seen so much tooling being built every day is that it's probably just a wide variety of data teams that deal with different problems out there. You've got people on the SQL side. You've got people who need the low code, no code because they're not good programmers. You have hardcore programming teams who need good monitoring tools. I mean, I kind of get it. There's just a wide range of people,

SPEAKER_00but it is still amazing the amount of ETL tools that get pushed out on a daily basis. I mean, go look at the amount of Apache Airflow competitors out there. It's crazy, and they still keep coming. I mean, you've got Prefect, Dagster, Mage. I mean, it's just never-ending. thing i have noticed with explosion of new tools recently though is rust it's kind of like the new kid on the street it's faster than anyone else rust has broadened the horizons and minds of those working in data and data engineering infrastructure so i've seen a ton of new rust-based streaming tools data frame tools and people

SPEAKER_00building distributed systems with these new rust-based tools it's partly driven by rust i think you know the death of java and all that sort of thing I mean, people think spark is dying, that's never going to happen, but there is a lot of things popping up, a lot of tooling popping around, and I think it has something to do with rust. I mean, it can be hard when you talk about picking new tools. I know it's hard to know what to take seriously. I tend to be on the pessimistic side just because something is new and it's created doesn't mean it's good and that I should use it. I need a real reason, and I think that's what most people should focus on with these glut of new toolings.

SPEAKER_00It needs to provide real value, and it has to have a real use case. I mean, you can ask, what is value? Well, that's different for everyone. It depends on the context, the problem, or the team. One's personal salvation could probably be another person's nightmare. Choose your new tooling wisely. Does it add unwanted complexity? That's always a bad idea. Does it reduce or increase the size of the code base? That's always something to watch out for. Does it cost a lot when scaled? What does its integrations look like? How well does it work with things like Databricks, Snowflake, Delta Lake? Does it work in the cloud?

SPEAKER_00Who hosts it? Does it fit into your current paradigm? Those are all things you should pay attention to. And you should probably already have a problem that exists rather than find a tool and like shove it into a hole. You shouldn't go looking for a tool. You should go looking for a tool and you actually need something. You have a problem that needs to be fixed. Rarely are you going to be happy if you're just bobbing along in life and you're saying, you know, airflow is working fine for me. But then someone comes and says, hey, use Dexter, use Mage, use Prefix, use GCP Composer, use Astronomer.

SPEAKER_00And it's like, well, if airflow is working fine for me, unless I have an actual pain point, you know, am I just looking for a problem and a reason to switch? Another topic I wanted to cover briefly that I've been thinking a lot about lately the last few years is using Rust for the small things. As a data engineer, most of us use Python most of the time. You've got a subset of us who use Rust, Golang, Scala, some statically typed stuff. I don't know. I've come to realize now that the demise of Python has been greatly exaggerated. I think it's fake news. It's not going to happen.

SPEAKER_00The rise of LLMs with its attending scaffold of Python has ensured that. But I also think things like pollers have cemented the idea that Rust-based data tools wrapped in Python are probably our future. And it begs the question, should you write Rust for the small things? I mean... Sure, I might want to write Rust for the everyday and mundane data engineering tasks, but is it a good idea? And what would happen if we did do that sort of thing? I mean, of course, it's a trade-off with everything. Python requires less code.

SPEAKER_00Does speed and safety matter in every application that you're going to use Rust in? Probably not. developer efficiency matters i know people argue about that topic but you know a lot of small startups and data engineers that have to move very quickly it would probably be detrimental detrimental if they were using rust to read s3 buckets when they could just use python and i suppose you could argue that every few milliseconds or seconds saved here and there across the code base with rust across entire data platform would have out to real savings and you know also the idea that rust strict compiler rules around the borrow checker

SPEAKER_00etc that that would add up to more reliable and less breakage and data platforms and i do buy into that argument i think that is true all that said humans are humans and that's not going to happen python will always be king but i do think rust will continue to make small strides in data engineering tooling, but also being used for the small things. People will recognize its safety, its strong type system, its quickness, its speed. I think you will start to see Rust kind of like sneaking into the edges and corners

SPEAKER_00of the everyday mundane tasks. I wanted to do a little test with flat files. So in this case, a flat file in S3. that needed a header and footer stripped out of it. So if you think about a CSV file or the text file with a bunch of records in it, a lot of times it can have timestamps at the beginning and end of those files that need to be stripped out. That's a pretty common data engineering task. And I wanted to write that both in Rust and Python just to kind of see again the difference.

SPEAKER_00So it's pretty obvious what you do with the Rust. It's not very complicated for Rust or Python. You basically just have to pull that file and you basically have to iterate that file pulling out the first record and the last record because you know they're junk and then rewriting that file. And I did that with Rust and it took about 410 milliseconds for a file. It was extremely fast and it was you know not that bad to write. And I redid that same thing in Python and it was about 740 milliseconds.

SPEAKER_00One thing I did notice is that the Rust code was roughly double in size, so the code size is double in Rust, and I didn't get that much of a bump in speed. But I don't know what I think about this. If you need bulletproof and fast, Rust is always the answer. If you just want easy, simple, and straightforward, then Python is always the answer. I mean, I think the truth of the matter is that Rust will probably never be used for the small stuff in data engineering for the most teams. Even though I wish it would, I think Rust is fun. It's a hard teacher. It makes us all better programmers.

SPEAKER_00But most people are going to use Python because it's easier. And that's just the way it is. I did a little poll on that article and I wrote it and put it out. And about 75% of people said no, they don't use Rust. About 25% said they do, which pretty much aligns with what I would think. There's always going to be a small subset of people who appreciate the speed and the safety of rust. And the last topic for today is I want to talk quickly just about hosted, so SaaS software, software as a service versus building your own stuff.

SPEAKER_00Now, I've been hacking around with tools and programming since Perl was a thing. I've worked on a gambit of data platforms from large organizations to tiny startups and everything in between. I've worked on data platforms that dropped on godly amounts of money on SAP products, or I've also worked on teams where we built our own massive data processing platforms custom on Kubernetes, and I guess it's each to their own. What do you want to do, bill or buy? It's the classic question. Do I bill or do I buy? I don't really have any vested interest in one or the other, the answer.

SPEAKER_00And I think build versus buy, whatever. I don't care that much. Well, I probably care if it's me and this project I'm working on. But anyhow, I think it's an interesting question to reason about the build versus buy. And I think the answer is clear and totally depends on the makeup of your engineering team and the size of your company. I don't think it has to be a hard question to answer. I'm just going to list out some stuff about when you should build and when you should buy. I think if you're a very small team, you should probably buy. And if you're a very big team, you should probably buy. If you're in between, you can consider building.

SPEAKER_00If you can't keep up with your current tech debt or you never have tech debt to work on, don't build. If you do average and common things every day... you should probably buy. If you're working on a problem space that's on the fringe, like maybe geospatial or something, doing something really funny, machine learning, geospatial combined, yeah, you can probably consider building. You're going to have a hard time finding tooling. If you have lots of time and not much work, a medium-sized team, you can probably build. If you have more work than time, typically, then you should probably buy.

SPEAKER_00If you're a very super technical team, yeah, you can consider building it. But if you're not that technical, you should probably buy. I mean, those are kind of obvious to me, and I don't understand why people make a big deal out of the build versus buy. I think when you ask yourselves those questions, I think the answer is usually fairly obvious. I think when it comes to getting the record straight on build versus buy, I think you really have to look if you're overworked and if you don't have an abundance of time on your hands, it's very unlikely that you should try to build tooling. People underestimate the amount of work it is to build and deploy your own

SPEAKER_00solutions and the amount of upkeep and maintenance those systems require. If you're already strapped from time, building your own system, deploying it, training people and keeping it up to date and adding features is probably a terrible idea and you're going to regret that. If you buy a thing, you pay for it, but you also receive something in return. The ability to do more with less. If you buy well, your maintenance time and cost should be low. If you're building your own thing, you're going to have to keep it up to date, fix bug features, documentation, etc. You can build things from scratch that work, and I've done this,

SPEAKER_00but you have to be ready to commit the time and the headcount to keep that thing running, train people to use it, and making tweaks. There's no free lunch. Custom built toolings, of course, are inherently more flexible. You can build what you want. How you want the sky's the limit. You can twist it and fold it to meet whatever needs arise. Not so much with the buying of a thing. It typically is what it is. And if you're going to have to move yourself to fit inside its pre-built box, that's just how it works. There's less flexibility, but that's okay. And also, you need to have the technical chops to build the thing to keep it going,

SPEAKER_00as well as add new features. I've worked at places where, you know, the technical chops were a little lacking and you build something... You know, you better not be a bunch of milquetoast programmers. You better be ready to be able to expand, meet your users' needs, add features, etc. And that can be a problem if you're not that technical of a team. And I think the other big one is team size. I think it's important we talk about team size because it should play a big role in the decision-making process. If you work on a very small team, you should probably not be building major pieces of technology for your stack.

SPEAKER_00Why? Because if you're a normal team with a normal workload and you're a tiny team, you're going to have other things to do with your time, better things you should be doing, not building something, you know, just to build something else on top of it. You have to make trade-offs. You need to focus and free up time to work on the things that are important for the business. And in the end, the business doesn't care how you deliver what they need. They just didn't want it delivered and working. There's a reason that Databricks and Snowflake became the juggernauts and took over the data world. Sure, they can cost a pretty penny, but they pay back in dividends.

SPEAKER_00No more teams of engineers working on EMR to make it sing. Databricks just works. You're freed up to work on more important business logic and other tasks. That's the whole idea. And the same idea goes for the build versus buy. On the other hand, if you're working on a huge data engineering team at a typical company and everything moves slow, it takes forever to do even the tiniest thing, all the red tape, this and that, do you really want to build something? Probably not. You should buy a tool, not build. Because the chances of you getting things done on time and on budget and having it adopted are very small.

SPEAKER_00Medium-sized teams that are working on fringe problems, I think there you have an argument to build. And I've been in those situations before. You have the resources to build, maintain, nothing fits perfectly what you need. You have the chops, build away. If you buy, you got to watch cost. If you build, you got to watch the complexity and drive ruthlessly towards completion. That's all we got today for today's Data Engineering Central podcast. I'm Dan. Thanks for your support. Thanks for listening. I'll see you in the next one.

Open the transcript file

Hosts and Guests

Nobody is credited on this episode yet.

Credit the people on this episode

Be the first to rate this episode

More episodes

All episodes
  1. AI Is Changing Software Engineering Forever | Gregor Ojstersek

    Nov 11, 202654 minAudio

    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),...

    Credit the people on this episode

  2. Life After Big Tech

    Nov 4, 202650 minAudio

    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...

    Credit the people on this episode

  3. AI Is a Mirror: MLOps, LLMOps & the Future of AI Engineering | Maria Vechtomova

    Sep 30, 202650 minAudio

    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...

    Credit the people on this episode

  4. The Future of Data Engineering in the Age of AI | Erfan Hesami

    Sep 16, 202647 minAudio

    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...

    Credit the people on this episode

  5. Big Tech Laid Him Off. He Realized He Didn’t Need a Job. — Asian Dad Energy

    Sep 9, 202649 minAudio

    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...

    Credit the people on this episode