AlloyDB Update

Overview

You can use this Snap to execute an AlloyDB update with the given properties.



Note:

Updates are batched up until the account's batch size property or the structure of the update statement changes. An update statement will change if an incoming document contains different keys than a previous document.

Snap views

View Description Examples of upstream and downstream Snaps
Input Schema name, table name, and the update condition to apply on the query.
Output Keys from the document are used as the columns to update, and their values are the updated values in the column.
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:

  • Stop Pipeline Execution Stops the current pipeline execution when an error occurs.
  • Discard Error Data and Continue Ignores the error, discards that record, and continues with the remaining records.
  • Route Error Data to Error View Routes the error data to an error view without stopping the Snap execution.

Learn more about Error handling in Pipelines.

Snap settings

Legend:
  • 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.
Learn more about the icons in the Snap settings dialog.
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: AlloyDB Update

Example: AlloyDB Update
Schema name String/Expression/ Suggestion The database schema name. Selecting a schema filters the Table name list to show only those tables in the selected schema. The property is suggestible and will retrieve available database schemas with suggested values.
Warning: The values can be passed using the Pipeline parameters but not the upstream parameter.

Default value: None.

Example: myschema

Table name String/Expression/ Suggestion The name of the table to execute the update operation on.
Warning: The values can be passed using the pipeline parameters but not the upstream parameter.

Default value: None.

Example: people

Update condition String/Expression Condition to execute an update on.
Tip: In 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. Therefore, we recommend that you use the format for Update condition and input data format as shown below:
{
"valueToUpdate" : "true",
"original": {
"col1" : "KEY"
}
}
Warning: In a scenario where the downstream Snap depends on the data processed in an Upstream Database Bulk Load Snap, use the Script Snap to add a delay for the data to be available.
Warning: Using expressions that join strings together to create SQL queries or conditions has a potential SQL injection risk and therefore is unsafe. Ensure that you understand all implications and risks involved before using a concatenation of strings with '=' Expression enabled.

Default value: None.

Examples:

Without using expressions
Using expressions
  • "EMPNO=$EMPNO and ENAME=$EMPNAME"

  • "emp='" + $emp + "'"

  • "EMPNO=" + $EMPNO + " and ENAME='" + $EMPNAME+ "'"

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 Specifies 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:
  • Validate & Execute: Performs limited execution of the Snap and generates a data preview during pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during pipeline runtime.
  • Execute only: Performs full execution of the Snap during pipeline execution without generating preview data.
  • Disabled: Disables the Snap and all Snaps that are downstream from it.

Default value: Execute only

Example: Validate & Execute