Generic JDBC Update
Overview
You can use this Snap to execute a SQL UPDATE statement for each batch of input documents. Keys from the document are used as the columns to update and their values will be the updated value in the column.

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.
This Snap also supports DML (Data Manipulation Language) operations (ALTER and INSERT) when using the AWS Athena database.
Write-type Snap
Works in Ultra Tasks
Snap views
| View | Description | Examples of upstream and downstream Snaps |
|---|---|---|
| Input | This Snap has exactly one document input view. | |
| Output | This Snap has at most one document output view. If an output view is available, then the original document that was used to create the statement will be output with the status of the update. | |
| 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 when 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. |
|
Snap settings
- Expression icon (
): Allows using pipeline parameters to set field values dynamically (if enabled). SnapLogic Expressions are not supported. If disabled, you can provide a static value.
- SnapGPT (
): Generates SnapLogic Expressions based on natural language using SnapGPT. Learn more.
- Suggestion icon (
): Populates a list of values dynamically based on your Snap configuration. You can select only one attribute at a time using the icon. Type into the field if it supports a comma-separated list of values.
- Upload
: Uploads files. Learn more.
| Field / Field set | Type | Description |
|---|---|---|
| Label | String | Required. Specify a unique name for the Snap. Modify this to be more appropriate, especially if more than one of the same Snaps is in the pipeline. Default value: Generic JDBC - Update Example: Generic JDBC -Update |
| Schema Name | String/Expression/ Suggestion | 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. Note: The values can be passed using the pipeline parameters but not
the upstream parameter. Default value: N/A Example: "PUBLIC" |
| Table Name | String/Expression/ Suggestion | Required. Specify the name of the table in the instance.
The table name is suggestible and requires an account setting. Note: The values can
be passed using the pipeline parameters but not the upstream parameter. Default value: N/A Example: Employee |
| Update Condition | 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:
Note: If the Update Condition field is left blank, the condition is applied
on all the records of the target table.
Refer to the SQL Server - Update example to understand how to use the Update Condition. Warning: Using expressions that join strings together to create SQL
queries or conditions has a potential SQL injection risk and is hence unsafe.
Ensure that you understand all implications and risks involved before using
concatenation of strings with '=' Expression enabled.
Default value: N/A Example: Without using expressions
Using expressions
|
| Number of retries | Integer/Expression | Specify 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. Default value: 0 Example: 3 |
| Retry Interval (seconds) | Integer/Expression | Specify the time interval between two successive retry requests. A retry
happens only when the previous attempt resulted in an exception. Default value: 1 Example: 10 |
| Snap execution | Dropdown list |
Choose one of the three modes in
which the Snap executes. Available options are:
Default value: Execute only Example: Validate & Execute |