apache / dolphinscheduler

Apache DolphinScheduler is the modern data orchestration platform. Agile to create high performance workflow with low-code

Home Page:https://dolphinscheduler.apache.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to implement insertOrUpdate

jnfJNF opened this issue · comments

Search before asking

  • I had searched in the issues and found no similar feature requirement.

Description

当我想同步两个数据源的数据时,如何实现根据ID进行新增或插入,即insertOrUpdate。请问有相应的组件吗?如何实现?

Use case

No response

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Search before asking

  • I had searched in the issues and found no similar feature requirement.

Description

When I want to synchronize data from two data sources, how can I add or insert based on ID, that is, insertOrUpdate. Are there any corresponding components? How to achieve?

Use case

No response

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Is this related to ds? There are two ways

  1. Directly use DB upsert SQL, different databases provide different grammar, some may doesn's support.
  2. Query the data in the database, if it does not exist then insert, others update. You may need to use lastUpdateTime to do optimistic concurrency control.