Using Update operation in database target

Scenario:
I am getting the data from a csv file and I am going to update the database.

Ex. I have a csv file with the following fields cid,rnumber and I want to update a table with this input Update customer set acc_number=rnumber where customerId=cid.

Solution:
You can simply accomplish this by creating a flow like this:

- Create a DB schema of the Target table.

- In the DB Schema put the Primary Key as customerId (which is a column in your table)

- Create the Source and Text schema of your CSV file

- Create the DB Target, select the Update as your DB Operation

- Create a Mapping and map rnumber to acc_number , cid to customerId

- Create the flow like this:

Start > Source > Text Schema > Mapping > DB Target > End Event

- Run the flow, the DB Target will automatically update the records based on the mapping and the primary key defined in the DB schema,

Have more questions? Submit a request

0 Comments

Article is closed for comments.