On this Page
Table of Contents | ||||
---|---|---|---|---|
|
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: |
Security prerequisite: You should have the following permissions in your Snowflake account to execute this Snap:
The following commands enable the minimum privileges in the Snowflake Console:
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. We plan to address this issue in a patch for the next monthly release in December. | |||||||||||||
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: |
| |||||||||||||
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.
Default value: [None] | |||||||||||||
Table name | Required. Table name to execute the delete on.
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.
Examples:
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
| |||||||||||||
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.
Default value: Continue to execute queued queries when the pipeline is stopped or if it fails | |||||||||||||
|
|
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 | ||||||
---|---|---|---|---|---|---|
|