SQL Server Update
This Snap executes an SQL UPDATE statement against a SQL Server database.
The SQL Server Update Snap executes an SQL update with the given properties. Document keys will be used as the column update, and their values will be used as the updated column value.
This Snap supports SQL Server 2008 or later versions.

Supported Accounts
- This is a Write-type Snap.
Prerequisites
None.
Limitations and known issues
None.
Snap views
| Type | Description | Examples of upstream and downstream Snaps |
|---|---|---|
| Input | This Snap has exactly one document input view. Document keys will be used as the column update, and their values will be used as the updated column value. | |
| Output | Optional. This Snap has at most one output view. If an output view is available, then the original document that was used to create the statement will be output along with the status of the update executed. | |
| Learn more about Error handling. | ||
Snap settings
| Field/Field set | Description |
|---|---|
|
Label String
|
Required.Specify a unique name for the Snap. Modify this to
be more appropriate, especially if there are more than one of the same Snap in the
pipeline.
Default value: SQL Server - Update |
Schema Name
String/Expression/ Suggestion |
Optional. Specify the database schema name. 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: dbo |
Table Name
String/Expression/ Suggestion |
Required. Specify the name of the table in which to update data. 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: Customers |
Update Condition
String/Expression |
Optional. 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. Examples: Without using expressions
Using expressions
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.
In certain scenarios where you want to use specific data from the upstream Snaps, and do not want to change that data in the Update Snap, then you need to place the data in the original structure of the input document. Hence, we recommend that you use the format for Update condition and input data format as shown below:
Note: If the Update Condition field is left blank, the condition is applied on all the records of the target table.
Default value: N/A |
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 |
For example, when performing a create, insert and a delete function sequentially on a pipeline, using a Script Snap helps in creating a delay between the insert and delete function or otherwise it may turn out that the delete function is triggered even before inserting the records on the table.