Generic JDBC Insert

Overview

You can use this Snap to execute a SQL INSERT statement. This Snap also supports DML operation (INSERT) when using the AWS Athena database.
Note: This operation is not supported for Apache Hive databases.


Snap views

View Description Examples of upstream and downstream Snaps
Input The second input view can be added to use the metadata of the source table as a document so that the table is created in SQL with a similar schema as the source table. The metadata is not used if the table already exists.
Output If an output view is available, then the original document that was used to create the statement is written to the output with the status of the insert executed.
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: Generic JDBC - Insert

Example: Generic JDBC -Insert
Schema Name String/Expression/ Suggestion Specify the database schema name. If 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: None.

Example: dbo

Table Name String/Expression/ Suggestion Required. Specify the name of a table to which the records are to be inserted.
Note: The values can be passed using the Pipeline parameters but not the upstream parameter.

Default value: None.

Example: people

Create table if not present Checkbox

Generates the table statement based on the schema available on the input view.

Default status: Deselected

Preserve case sensitivity Checkbox
Select this checkbox to preserve the case sensitivity of the column names while performing the insert operation.
  • If you deselect the Preserve case sensitivity checkbox, the input documents are loaded to the target table if the key names in the input documents match the target table column names ignoring the case.

  • If you include a second input view, selecting this checkbox has no impact on the column names of the target table, because the Snap uses the metadata from the second input view.

Default status: Deselected

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.
Note:

If you provide a string value, the Snap displays the following error:

Invalid type (STRING) for property, expecting a value of type integer

You can use a string value only when the field is expression-enabled.

Default value: 0

Example: 3

Retry Interval (seconds) Integer/Expression Specify the time period 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

Examples