Selecting different fields and keys for insert, update, and delete

Many applications will write to/delete from the same table in many different ways, using different fields as keys and often updating different fields at different times. This recipe shows how this can be achieved without having to create new schemas each time.

Getting ready

Open the job jo_cook_ch07_0080_fieldSelection.

How to do it…

The steps to be performed are as follows:

  1. Open the tMysqlOutput component and change the field Action on data from Insert to Insert or update.
  2. Now click on the Advanced settings tab.
  3. Tick the box Use field options to reveal the Field Options panel. You should see that all the fields are set as Insertable and Updatable.
  4. Uncheck createdDate and createdBy in ...

Get Talend Open Studio Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.