Upsert

Activity Description

This activity is used exclusively for upserting (insert or update) records in a database.

Properties: These are parameters associated with the activity:

  • activityGroup: Indicates the group or category of the activity.

  • activityType: Specifies the type of activity.

  • activityName: The name of the activity, which is "Upsert."

  • rdbConnection: This parameter for specifying the database connection to be used.

  • upsertStatement: The query to perform the upsert operation.

  • returnGeneratedKeys: This setting to determine whether to return any auto-generated keys after the upsert operation.

Here's a sample configuration for the Upsert activity:

{
  "activityGroup": "Database Operations",
  "activityType": "SIMPLE",
  "activityName": "Upsert",
  "rdbConnection": {
    "driver": "com.mysql.jdbc.Driver",
    "url": "jdbc:mysql://localhost:3306/mydatabase",
    "username": "username",
    "password": "password"
  },
  "upsertStatement": "INSERT INTO my_table (id, name) VALUES (?, ?) ON DUPLICATE KEY UPDATE name = VALUES(name)",
  "returnGeneratedKeys": true
}

Last updated