On this Page
This Snap provides functionality to lookup records in the target MySQL table and return a selected set of fields for every matched record. The Snap executes one request per multiple input documents to avoid making a request for every input record.
JSON paths can be used in the Snap properties and will have values from an incoming document substituted into the properties. However, documents missing values for a given JSON path will be written to the Snap's error view. After a query is executed, the query's results are merged into the incoming document.
|Support and limitations:|
|Required. The name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline.|
The database schema name. In case it is not defined, then the suggestion for the Table Name will retrieve all tables names of all schemas. The property is suggestable and will retrieve available database schemas during suggest values.
Required. Enter or select the name of SQL table to execute the lookup query on.
Required. Enter or select output field names for SQL SELECT statement.
Required. The lookup conditions are created by using the lookup column name and the lookup column value. Each row will build a condition, such as lookupColumn1 = $inputField. Each additional row will be concatenated using a logical AND. All rows together build the lookup condition being used to lookup records in the lookup table.
Required. Enter or select the JSON path of the lookup column value. The value will be provided by the input data field.
Lookup column name
Required. Enter or select the lookup column name.
Pass-through on no lookup match
When there is no lookup matching an input document, the input document will pass through to the output view if this property is checked. Otherwise, it will be written to the error view as an error condition.
Default value: False
The following example shows how a MySQL object record can be looked up using the MYSQL Lookup Snap and record the data using the MYSQL Execute Snap. In this pipeline, the MySQL Lookup Snap retrieves data from a table called 'Test1'.
The MySQL Execute Snap executes a select SQL statement to get the information from table Test1.
The MySQL Lookup Snap runs the lookup query on, and the lookup conditions specify the column names to be looked up in the look-up table Test1.
Additionally, in the Output fields, select the names of the specific output field name(s) for the output preview to contain only those fields('isactive' 'id') to be recorded on the target table.
Successful execution of the pipeline displays the below output preview: