seatunnel icon indicating copy to clipboard operation
seatunnel copied to clipboard

[FAQ] How to read incremental data from source table and sink to sink table using apache seatunnel?

Open sangeetha1706 opened this issue 3 years ago • 6 comments

Search before asking

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

Description

i want to fetch incremental data from mysql source table based on last fetch id or last inserted timestamp and sink data to destination table.i should read data from source table where it stopped fetching last time and continue from the latest records which got inserted to sopurce table and sink that to destination table.how can i achieve this in apache seatunnel ?

Usage Scenario

No response

Related issues

No response

Are you willing to submit a PR?

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

Code of Conduct

sangeetha1706 avatar Mar 21 '23 16:03 sangeetha1706

You can use CDC connector like MySQL CDC Source Connector https://seatunnel.incubator.apache.org/docs/connector-v2/source/MySQL-CDC.

EricJoy2048 avatar Mar 27 '23 05:03 EricJoy2048

This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.

github-actions[bot] avatar Apr 28 '23 00:04 github-actions[bot]

any other ideas? @EricJoy2048 there are not all connectors support cdc There could be any sql based table or file. What is best pattern to offset already loaded or computed data in the source and sink only difference? some time there could be an issue or network blinking or technical maintain hours and need to be sure in when I turn on seatunnel it didn't load the full data again or will not making any overwork.

YuriyGavrilov avatar Sep 05 '24 20:09 YuriyGavrilov

any other ideas? @EricJoy2048 there are not all connectors support cdc There could be any sql based table or file. What is best pattern to offset already loaded or computed data in the source and sink only difference? some time there could be an issue or network blinking or technical maintain hours and need to be sure in when I turn on seatunnel it didn't load the full data again or will not making any overwork.

Yes, you're right. For oltp databases, usually we can use query like select id,name from table where id>=${lastOffsetId} for incremental batch scenario, at the same time, we can enable upsert on the sink connector if the sink side can support upsert and use checkpoint is also a good method to avoid loading full data again.

davidzollo avatar Apr 23 '25 14:04 davidzollo

This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.

github-actions[bot] avatar Jul 15 '25 00:07 github-actions[bot]

This issue has been closed because it has not received response for too long time. You could reopen it if you encountered similar problems in the future.

github-actions[bot] avatar Jul 23 '25 00:07 github-actions[bot]