UPDATE or INSERT and record how many rows it changed. You write the statement once with named parameters such as :sku and supply the values separately, so values from your data are never pasted into the SQL text. This keeps the query safe when a value contains quotes or other special characters. This is the successor of the previous Execute SQL query transformer, which built the SQL text from placeholders.
Fields
Sample data
The rows you get back depend on the data in your database. In the example below theproducts table holds a product with SKU SHIRT-RED-M, and the transformer looks it up by the incoming sku.
Input:
For an input of
{ "sku": "SHIRT-RED-M", "qty": 2 } the output is: