Inserting or updating data with the Insert / Update step

While the Table output step allows you to insert brand new data, the Insert / Update step allows you to do both, insert and update data in a single step.

The rows directed to the Insert / Update step can be new data or data that already exists on the table. Depending on the case, the Insert / Update step behaves differently. Before explaining each case, let's introduce the step. The following image corresponds to the Insert / Update configuration window:

Insert / Update window

As you can see, the upper section is identical to the Table output window. Here, you select the database connection and provide the table name where you will insert or update rows.

Then we have two grids. While the upper grid is meant to define the conditions for the inserts or updates, the lower grid is where you define the fields to be inserted or updated.

Let's see each case in detail:

If you don't want to perform any Update operation, you can check the Don't perform any updates option.

This insert operation is exactly the same as you could have done with a Table output step. This implies that here also you have to be careful about the following:

If you only want to perform updates, you can use the Update step instead. The configuration window is almost identical to the Insert / Update one.