MySQL Insert Example

This example pipeline demonstrates how to insert records to an existing table using the JSON Generator Snap and map them to the MySQL table 'Hues' using the Mapper and the MySQL Insert Snaps, respectively. The failed records are routed to the error view.

Insert records in a table



Configure the JSON Generator Snap to pass the values to the Mapper Snap.



Configure the Mapper Snap to map the records to the respective columns on the table.

The output preview of the Mapper Snap displays the added records.



Configure the MySQL Insert Snap to insert the records into the table 'Hues' on the 'Snaplogic' Schema.



The failed records are routed to the error view, which displays the reason that the column 'rgb' is unknown in the field list (indicating that the column rgb is absent in the existing table, and hence, the two records with the RGB values are routed to the error view).