On this Page
Table of Contents | ||||
---|---|---|---|---|
|
Overview
This Snap executes a SQL Merge with given properties. The documents that are provided in the input view will be merged into the provided table on the provided database. Each document on the input view is expected to be merged or created with/as a new record in the table. Learn more about SQL Merges: Oracle Merge.
Upcoming
Multiexcerpt include macro | ||||||||
---|---|---|---|---|---|---|---|---|
|
Snap type: | Write | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Snap Input/Output: |
A good example for a merge condition is SALARY = $SALARY (here we use the SALARY variable of the input document). A bad example for a merge condition is SALARY = '100000' (this will not work since we validate the provided columns in the condition against the types defined in the table schema). You do not want to use the expression toggle on the merge condition, there is support for it but it requires undocumented functions. The bad example can be rewritten by using an upstream Mapper Snap, where '10000' is mapped to the SALARY variable, which then can be used in the merge condition as defined in a good example. The same applies for pipeline parameters, which need to be mapped upstream similarly using a Mapper Snap. | |||||||||||||
Prerequisites: | [None] | |||||||||||||
Support and limitations: | Works in Ultra Task PipelinesTasks. | |||||||||||||
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 Specify 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 Specify 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 suggestible and will retrieve available database schemas during suggest values.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.
Example: SYS | |||||||||||||
Table name | Required. Name of table to execute insert onSpecify the table that the rows will be inserted into. This list is populated based on the tables associated with the selected schema.
Default value: [None] | |||||||||||||
Number of retries | Specifies the maximum number of attempts to be made to receive a response. The request is terminated if the attempts do not result in a response. Example: 3 Default value: 0
| |||||||||||||
Retry interval (seconds) | Specifies the time interval between two successive retry requests. A retry happens only when the previous attempt resulted in an exception. Example: 10 Default value: 1
| |||||||||||||
Merge condition | Required. The ON condition of the merge statement. A boolean-type expression is expected. For an explanation of merge syntax, see Oracle Merge. Default value: [None] | |||||||||||||
Session parameters | Use this fieldset to set the National Language Support (NLS) parameters. Learn more about Setting NLS Parameters. The NLS parameters override the default value, for example, comma (,) set for the session in the initialization parameter file or set by the client with environment variables, such as a decimal point. | |||||||||||||
Session parameter name | Specify the name of the NLS parameter.
Default value: None. | |||||||||||||
Session parameter value | Specify the value for the NLS parameter. This field supports only pipelines parameters, and not support upstream values. Default value: None. Example: CZECH REPUBLIC | |||||||||||||
|
|
Examples
Following are two examples. The first one using a conditional update of one of the values which gets then merged into the data using a Oracle Merge Snap. The second one will showcase error handling.
Expand | ||
---|---|---|
| ||
In the first example, we will drop a table, insert data into a newly created table, update one of records and then merge that update result into the same table.
|
Expand | ||
---|---|---|
| ||
In the second example, we use an error view on the Oracle Merge Snap.
|
Snap Pack History
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|