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: 

Delta Lake Table Daily Read and Write job optimization

AH
New Contributor III

AH_0-1717569489175.png

I have created 7 job for each business system to extract product data from each postgress source then write all job data into one data lake delta table [raw_product].

each business system product table has around 20 GB of data.

do the same thing for 15 table .

is any way to read and write fast in delta tables  

 

one job looks like the one below

AH_1-1717572455868.png

daily day loaded into delta table by using merge command

AH_3-1717572644640.png

 

AH_2-1717572557758.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

shan_chandra
Databricks Employee
Databricks Employee

@AH  - we can try out the config 

if read or fetch from postgres is slow , we can increase the fetchsize , numPartitions (to increase parallelism). kindly try to do a df.count() to check on slowness. 

https://spark.apache.org/docs/latest/sql-data-sources-jdbc.html

 

 If the write is slow, kindly try to a write the data to a temp table first before merge to see if this is an issue due to merge. 

View solution in original post

1 REPLY 1

shan_chandra
Databricks Employee
Databricks Employee

@AH  - we can try out the config 

if read or fetch from postgres is slow , we can increase the fetchsize , numPartitions (to increase parallelism). kindly try to do a df.count() to check on slowness. 

https://spark.apache.org/docs/latest/sql-data-sources-jdbc.html

 

 If the write is slow, kindly try to a write the data to a temp table first before merge to see if this is an issue due to merge. 

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