Understanding Dataslayer Writing Modes

When using some of our destinations as Big Query, Amazon S3, or Amazon RedShift, you can find write mode options. In this article, we will explain to you the differences between these options.

You can find this option in the Destination section when creating our transfer.

New UI - FAQ Create query RS (10)
Example with AWS RedShift


There are three types of Write Mode:

  • Append
  • Replace
  • Upsert

Let's understand what each of these options does. 

Append

It is the most used and recommended mode. This option will add the new data to the end of the table

This means the new data will be inserted below the last row of the table. If the table has no data, it will be added normally.

Note that if you try to insert data into a table whose configuration and characteristics are different from the data you are trying to insert, you will get an error of structure, and the data will not be inserted. Learn more in this article

 

Replace

We recommend that you do not use this option or use it with caution since it DELETES all the data previously imported to the table and adds all the new data in the same table.

This option is useful if you have made a mistake when inserting data, or if for some reason you want to delete previously entered data and add new data to the same table.

 

Upsert

This option will update the old data and add the new data at the end of the table.

Note that this option takes longer to complete as it must update all the data previously imported.

This option is useful if the previously inserted information is outdated. However, we do not recommend it in case of having a lot of data in the table to avoid errors.

 

As always, please contact us via our live chat on our website or via email if you still have doubts or questions. We are happy to help!