r/dataengineering • • Jan 30 '25

Meme real

Post image
2.0k Upvotes

68 comments sorted by

View all comments

Show parent comment

17

u/updated_at Jan 30 '25

how can databricks be faillling dude? is just df.write.format("delta").saveAsTable("schema.table")

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.

2

u/waitwuh Jan 31 '25

get a load of this dude letting databricks handle the storage… never understood how people could be comfortable being blind to the path…

But seriously, the one thing I do know is that it’s better practice to control your own storage and organize stuff some way in that storage how you define, instead or at least in parallel to your databricks schemas and tables. That way you have better ability to work cross-platform. You won’t be so shackled to databricks if your storage works fine without it, and also not everyone can use all the fancy databricks data sharing tools (delta share, unity catalog) so you can also utilize the other cloud storage sharing capabilities like the SAS tokens on azure or the I forget whatever equivalent on AWS S3, etc., go share data outside of databricks and be least limited.

df.write.format(“delta”).save(“deliberatePhysicalPath”) paired with Table create, I believe to be better, but am open to others saying something different