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:ย 

Handling Concurrent Writes to a Delta Table by delta-rs and Databricks Spark Job

prem14f
New Contributor II

Hi @dennyglee@Kaniz_Fatma.

If I am writing data into a Delta table using delta-rs and a Databricks job, but I lose some transactions, how can I handle this?

Given that Databricks runs a commit service and delta-rs uses DynamoDB for transaction logs, how can we handle concurrent writers from Databricks jobs and delta-rs writers on the same table?

1 REPLY 1

Kaniz_Fatma
Community Manager
Community Manager

Hi @prem14f, To manage lost transactions, implement retry logic with automatic retries and ensure idempotent writes to avoid duplication. For concurrent writers, use optimistic concurrency control, which allows for conflict detection and resolution during commits, partition your Delta table to reduce conflict likelihood, and ensure proper configuration and access to transaction logs. An example implementation in Databricks involves retrying writes with a delay if failures occur. Additionally, set up monitoring, alerts, and conflict resolution strategies to address issues promptly. 

Is there a specific part of this process youโ€™d like to dive deeper into?

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