Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Version published after converting to the new editor

On this Page

Table of Contents
maxLevel2
excludeOlder Versions|Additional Resources|Related Links|Related Information

Snap type:

Write

Description:

This Snap executes a Snowflake SQL delete with the given properties.

Expected upstream Snaps: The dynamic values to be used in the delete condition can be defined by providing values upstream. The document generator Snaps JSON Generator can be used upstream.

Expected downstream Snaps: The Snap will output one document for each execution of the Snap with data about the number of documents deleted, hence any document processing Snap can be used downstream.

Prerequisites:

Insert excerpt
Snowflake - Bulk Load
Snowflake - Bulk Load
nopaneltrue

Security prerequisite: You should have the following permissions in your Snowflake account to execute this Snap: 

  • Usage (DB and Schema): Privilege to use the database, role, and schema.

The following commands enable the minimum privileges in the Snowflake Console:

Code Block
grant usage on database <database_name> to role <role_name>;
grant usage on schema <database_name>.<schema_name>;

For more information on Snowflake privileges, refer to Access Control Privileges.

Internal SQL Commands

This Snap uses the DELETE command internally. It enables deleting data from a table using an optional WHERE clause and/or additional tables.

Support and limitations:

Works in Ultra Task Pipelines.

Known Issues:Because of performance issues, all Snowflake Snaps now ignore the Cancel queued queries when pipeline is stopped or if it fails option for Manage Queued Queries, even when selected. Snaps behave as though the default Continue to execute queued queries when the Pipeline is stopped or if it fails option were selected.

Image Modified

Account: 

This Snap uses account references created on the Accounts page of SnapLogic Manager to handle access to this endpoint. See Configuring Snowflake Accounts for information on setting up this type of account.


Views:


Input

This Snap has at most one document input view. 

Output

This Snap has at most one document output view. 

Error

This Snap has at most one error view and produces zero or more documents in the view.



Settings

Label


Required. 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



The database schema name. In case it is not defined, then the suggestion for the Table Name will retrieve all table 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]

Table name

Required. Table name to execute the delete on.

Note

The values can be passed using the pipeline parameters but not the upstream parameter.

Default value:  [None]
 

Delete Condition (Truncates Table if empty)

Required. This is an expression property to specify the Snowflake SQL WHERE clause of the delete statement. The delete condition may also be passed via an upstream Snap or through the pipeline parameters.

Note

Specify a valid WHERE clause for the delete condition. If you leave this field blank, the Snap truncates the table.

Examples

Multiexcerpt include macro
nameME_DB_Snaps_Query_Examples
pageOracle - Update

Default value:  [None]

Number of retries

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.

Example: 3

Default value: 0

Multiexcerpt include macro
nameretries
pageFile Reader

Retry interval (seconds)

Specifies the time interval between two successive retry requests. A retry happens only when the previous attempt resulted in an exception. 

Example:  10

Default value: 1

Manage Queued Queries

Select this property to decide whether the Snap should continue or cancel the execution of the queued Snowflake Execute SQL queries when you stop the pipeline.

Note

If you select Cancel queued queries when the pipeline is stopped or if it fails, then the read queries under execution are canceled, whereas the write queries under execution are not canceled. Snowflake internally determines which queries are safe to be canceled and cancels those queries.

Default value: Continue to execute queued queries when the pipeline is stopped or if it fails

Multiexcerpt include macro
nameSnap Execution
pageSOAP Execute

Multiexcerpt include macro
nameExecution_Detail_Write
pageSOAP Execute

  

Example


In the following example, the Snowflake Delete Snap deletes a record from Snowflake database table, ADOBEDATA123, under the schema PRASANNA.

In the delete condition, the record ID is specified (ID='a2m1400000KAjBAAA1' ) and the record that has the specified ID is deleted from the database:  

Successful execution of the above Snap shows the following data preview:

Insert excerpt
Snowflake Snap Pack
Snowflake Snap Pack
nopaneltrue