cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Read and process large CSV files that updates regularly

Kjetil
New Contributor III

I've got a lot of large CSV files (> 1 GB) that updates regularly (stored in Data Lake Gen 2). The task is to concatenate these files into a single dataframe that is written to parquet format. However, since these files updates very often I get a read error. I've tested with both batch and streaming (autoloader). I think perhaps the only way to deal with this is to create a copy (snapshot) of the files, then process in batch. However that takes a very long time - ideally I would like to avoid that extra step if possible. 

I've been stuck with this issue for two days now, so any help here is much appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions

daniel_sahal
Esteemed Contributor

@Kjetil Since they are getting updated often then IMO making a copy would make sense.

What you could try is to create Microsoft.Storage.BlobCreated event to replicate the .CSV into the secondary bucket.

However, best practice would be to have some kind of incremental approach on the source side - creating a new file instead of appending to the existing one.

View solution in original post

1 REPLY 1

daniel_sahal
Esteemed Contributor

@Kjetil Since they are getting updated often then IMO making a copy would make sense.

What you could try is to create Microsoft.Storage.BlobCreated event to replicate the .CSV into the secondary bucket.

However, best practice would be to have some kind of incremental approach on the source side - creating a new file instead of appending to the existing one.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group