...
In this
...
article
Table of Contents | ||||
---|---|---|---|---|
|
...
Snap type:
Write
...
Description:
...
Overview
You can use the Oracle - Execute Snap to execute an SQL update query with the specified properties. Document keys
...
are used as the columns to update, and their values
...
are used as the updated value.
Note |
---|
Updates will be batched up until the account's batch size property or until the structure of the update statement changes. An update statement will change if an incoming document contains different keys than a previous document. |
...
None
...
Upcoming
Multiexcerpt include macro | ||||||||
---|---|---|---|---|---|---|---|---|
|
Snap Type
Write
Prerequisites
None.
Limitations and Known Issues
None.
Support for Ultra Pipelines
Works in Ultra Pipelines.
...
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.
...
This Snap allows exactly one input view.
...
This Snap has at most one error view and produces zero or more documents in the view.
...
Snap Views
Type | Format | Number of Views | Examples of upstream and downstream Snaps | Description |
---|---|---|---|---|
Input | Document |
|
| Values to be updated in the target columns. |
Output | Document |
|
| Updated records. |
Error | Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter while running the Pipeline by choosing one of the following options from the When errors occur list under the Views tab. The available options are:
Learn more about Error handling in Pipelines. Database Write Snaps output all records of a batch (as configured in your account settings) to the error view if the write fails during batch processing. |
Snap Settings
Info |
---|
|
Field | Field Type | Description |
---|---|---|
Label |
...
*
| String | 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
| String/Expression/Suggestion | 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. This field is suggestible and will retrieve available database schemas during suggest values.
| ||
Table name*
|
...
Value: None |
---|
...
Table name
...
people | String/Expression/Suggestion | The name of the table to execute the update operation on.
| ||
---|---|---|---|---|
Update condition* Default value: |
...
Update condition
Required. The condition to execute an update on.
...
None Examples: |
---|
...
name | ME_DB_Snaps_Query_Examples |
---|
Without using expressions
|
---|
...
...
Using expressions
|
---|
...
|
---|
...
String/Expression | Specify the SQL WHERE clause of the update statement. You can define specific values or columns to update (Set condition) in the upstream Snap, such as Mapper Snap, and then use the WHERE clause to apply these conditions on the columns sourced from the upstream Snap. For instance, here is a sample of an Update SQL query:
Refer to the example to understand how the Update Condition works.
| |||||||||
---|---|---|---|---|---|---|---|---|---|---|
Number of |
...
Retries Default Value: 0 | Integer/Expression | 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. |
---|
...
This field does not support values from upstream Snaps when you enable the expression icon; it can accept values only from Pipeline parameters. |
Retry Interval (seconds) Default value: |
---|
...
1 |
---|
...
10 | Integer/Expression | Specifies the time interval between two successive retry requests. A retry happens only when the previous attempt resulted in an exception. |
---|
...
This field does not support values from upstream Snaps when you enable the expression icon; it can accept values only from Pipeline parameters. |
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
| String/Expression | Specify the name of the NLS parameter. | ||||||||||||
Session parameter value
| String/Expression | Specify the value for the NLS parameter. | ||||||||||||
| Dropdown list |
|
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Examples
Expand | ||
---|---|---|
| ||
In this example, we will update a record in a table.
|
...
First, we use a JSON Generator Snap to pass the new data:
|
...
This is an example output of the pipeline:
|
Expand | ||
---|---|---|
|
...
This example pipeline demonstrates how error handling works. |
...
We |
...
use the same pipeline as the one used in Example #1. The difference is this time we try to update the column "Titlee" which doesn't exist in TEST_EMPLOYEE table:
And this is the error message routed to the error view:
|
Expand | ||
---|---|---|
| ||
In this example, we will use the well-known Northwind sample database |
...
Following is a selection from the "Customers" table:
Enter Customers in the Table name property and CustomerName='Alfreds Futterkiste' in the Update condition property. Assume that the Update Snap receives a Map data in the input view as following:
|
and submit the request to the database server. |
...
|
Snap Pack History
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|