seatunnel icon indicating copy to clipboard operation
seatunnel copied to clipboard

[Feature]Timeliness issue in the pre-check before writing data

Open JanSay opened this issue 1 year ago • 1 comments

Search before asking

  • [x] I had searched in the feature and found no similar feature requirement.

Description

In my current implementation, I’m using a query in the source to execute an INSERT statement for data writing. Before the writing operation, I need to delete the existing data from the target table.

However, I’ve noticed that changing the value of data_save_mode has no effect, even though I have already configured a custom_sql statement. According to the documentation, the query parameter has a higher priority. But based on my understanding, custom_sql should be executed first.

Could you please confirm whether this behavior is by design or if it might be a bug?

I use the 2.3.12

Usage Scenario

I need to write data from Oracle/MySQL to PostgreSQL, and since the fields need to be mapped correspondingly, I have to write an INSERT statement in the query to complete this operation.

However, due to data issues, an error occurred during synchronization. Therefore, when I execute the process again, I would like to delete the data in the target database before writing.

Related issues

No response

Are you willing to submit a PR?

  • [x] Yes I am willing to submit a PR!

Code of Conduct

JanSay avatar Oct 28 '25 10:10 JanSay

I use the transform to solve this issue. Using FieldMapper : https://seatunnel.apache.org/docs/2.3.12/transform-v2/field-mapper/

JanSay avatar Nov 11 '25 07:11 JanSay