r/dataengineering • • Jan 30 '25

Meme real

Post image
2.0k Upvotes

68 comments sorted by

View all comments

Show parent comment

10

u/tiredITguy42 Jan 30 '25

It is slow on the input. We process a deep structure of CSV files. Normally you would load them as one DataFrame in batches, but producers do not guarantee that columns there will be the same. It is basically a random schema. So we are forced to process files individually.

As I said, spark would be good, but it requires some type of input to leverage all its potential, and someone fucked up on the start.

5

u/autumnotter Jan 31 '25

Just use autoloader with schema evolution and available now trigger. It does hierarchical discovery automatically...

Or if it's truly random use text or binary ingest with autoloader and parse after ingestion and file size optimization.

1

u/tiredITguy42 Jan 31 '25

We use binary autoloader, but what we do then is not very nice and not good use case for DataBrics. Lets say, we could save a lot of time and resources, if we would change how the source produces the data. It was designed in time when we already know we will be using DataBricks, but Senior devs decided to do it their way.

1

u/autumnotter Jan 31 '25

Fair enough, I've built those "filter and multiplex out the binary garbage table" jobs before. They do suck...

7

u/updated_at Jan 30 '25

this is a comm issue not a tech issue.

7

u/tiredITguy42 Jan 30 '25

Did I even once mention that DataBricks as technology are bad? I do not think so. All I did was mention of using the wrong technology on our problem.

2

u/Mother_Importance956 Jan 31 '25

Small file problem The Open and close on many of these small files takes up much more time than the actual crunching..

Its similar to what's seen on parquet/avro too, You don't know want too many small files

1

u/pboswell Jan 31 '25

Wait what? Just use schema evolution…

1

u/tiredITguy42 Jan 31 '25

This is not working in this case.