On this Page
Table of Contents | ||||
---|---|---|---|---|
|
Overview
This Snap provides functionality to lookup records in the target Oracle table and returns 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.
Upcoming
Multiexcerpt include macro | ||||||||
---|---|---|---|---|---|---|---|---|
|
Snap type: | Read | |||||||
---|---|---|---|---|---|---|---|---|
Description: |
Queries produced by the Snap have the format:
The Snap ignores any duplicated lookup condition in the input document stream since it maintains a cache for lookup conditions internally.
| |||||||
Prerequisites: | None | |||||||
Support and limitations: | Works in Ultra Pipelines. | |||||||
Account: | This Snap uses account references created on the Accounts page of SnapLogic Manager to handle access to this endpoint. See Oracle Account for information on setting up this type of account. | |||||||
Views: |
| |||||||
Settings | ||||||||
Label | 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. | |||||||
Schema name | The values can be passed using the pipeline parameters but not the upstream parameter. The Specify the database schema name. Selecting a schema, filters the the Table name list list to show only those tables within the selected schema. This property is suggestible and will retrieve available database schemas during suggest values. Note | The suggestions in the Schema field are populated only when at least a single table exists in the schema. If no tables exist to use that schema, only SYS, SYSTEM, and XDB are populated. Default value: None | ||||||
Table name | Required. Enter or select the name of the table to execute the lookup query on.
Example: people | |||||||
Output fields | Enter or select output field names for SQL SELECT statement. If this property is empty, the Snap selects all fields by executing the statement "SELECT * FROM ..." | |||||||
Lookup conditions | 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. | |||||||
Value | Required. Enter or select the JSON path of the lookup column value. The value will be provided by the input data field. Example: $email, $first, $last | |||||||
Lookup column name | Required. Enter or select lookup column name. Example: email, first, last | |||||||
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 | |||||||
Column-specific timestamp precision | Select this checkbox to display column-specific timestamp with millisecond, microsecond, or nanosecond precision in string type.. Default Value: Deselected | |||||||
Snap Execution | Select one of the following three modes in which the Snap executes:
Default Value: Execute only |
Note |
---|
The Oracle database handles the case-sensitivity of column names differently from other databases. If the columns are created in all uppercase, you may refer to them in any case. Oracle database changes them to all uppercase automatically. However, if the columns are created in mixed case or lowercase, they are case-sensitive AND they must be enclosed in double quotes in the SQL statements, and you must follow the same rule when you enter the Output fields and Lookup column name properties as in the examples above. |
Note |
---|
Date type column cannot be used in the Lookup conditions. You will have to use the Oracle Execute Snap for this purpose. An example of the execute statement is:
|
Examples
Expand | ||
---|---|---|
| ||
In this example, we have a table named STUDENT that stores students' scores. It has 3 columns: ID, NAME and SCORE. We will find all the student records that have same scores with Adam's with this pipeline: The Oracle-Select Snap finds the row whose NAME is 'Adam', and pass the row's data to Oracle-Lookup Snap: Then the Oracle-Lookup Snap will lookup all the rows that has the same score as Adam's. We use $SCORE to retrieve data of SCORE Column passed from Oracle-Select Snap. This is the output of the pipeline, Bob has the same score as Adam's: |
Expand | ||
---|---|---|
| ||
This example will show the error handling of the Snap. We use the same pipeline as the one in example 1 and route error messages to error view: We add one row of Lookup condition with value as $AGE and Lookup column name as SCORE, this setting should cause type mismatch error since column SCORE is of type NUMBER while column NAME is of type VARCHAR2: Here is the error message that is routed to the error view: |
Downloads
Multiexcerpt include macro | ||||
---|---|---|---|---|
|
Attachments | ||
---|---|---|
|
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|