Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request][Spark] Support idempotent write for INSERTS/DELETE/UPDATE/MERGE with options specified in the commands #3934

Open
2 of 8 tasks
arturowczarek opened this issue Dec 9, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@arturowczarek
Copy link

Feature request

Which Delta project/connector is this regarding?

  • Spark
  • Standalone
  • Flink
  • Kernel
  • Other (fill in here)

Overview

With #1555 the Delta commands can make idempotent writes using the txnAppId and txnVersion from Spark configuration. The configuration is shared between threads and it is impossible to execute writes concurrently with different values. We should have support for specifying .option("txnVersion", version).option("txnAppId", app_id) also in the commands.

Motivation

When the applications run concurrently, the writes must be serialized. If they are serialized, there is no point in having concurrency.

Further details

This is how it could look like

deltaTable.as("t")
  .merge(
    df.as("s"),
    "t.col1 = s.col1")
  .whenMatched.updateExpr(Map("t.col2" -> "t.col2 + s.col2"))
  .whenNotMatched().insertAll()
  .option("txnAppId", "mySampleApp")
  .option("txnVersion", "1")
  .execute()

Willingness to contribute

The Delta Lake Community encourages new feature contributions. Would you or another member of your organization be willing to contribute an implementation of this feature?

  • Yes. I can contribute this feature independently.
  • Yes. I would be willing to contribute this feature with guidance from the Delta Lake community.
  • No. I cannot contribute this feature at this time.
@arturowczarek arturowczarek added the enhancement New feature or request label Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant