...
...
...
...
...
...
On this Page
Table of Contents | ||||
---|---|---|---|---|
|
...
Snap type:
...
Write
...
Description:
...
Overview
You can use this Snap to execute 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.
...
Snap Type
The Snowflake - Delete Snap is a WRITE-type Snap.
Prerequisites
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Security
...
Prerequisites
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
...
for Ultra Pipelines
Works in Ultra
...
Pipelines. However, we recommend that you not use this Snap in an Ultra Pipeline.
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.
...
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.
...
This Snap has at most one document input view.
...
This Snap has at most one document output view.
...
This Snap has at most one error view and produces zero or more documents in the view.
...
Settings
Label
...
Snap Views
Type | Format | Number of Views | Examples of Upstream and Downstream Snaps | Description |
---|---|---|---|---|
Input | Document |
|
| Incoming documents are first written to a staging file on Snowflake's internal staging area. A temporary table is created on Snowflake with the contents of the staging file. An update operation is then run to update existing records in the target table and/or an insert operation is run to insert new records into the target table. |
Output | Document |
|
| If an output view is available, then the output document displays the number of input records and the status of the bulk upload as follows:
|
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:
Learn more about Error handling in Pipelines. |
Snap Settings
Info |
---|
|
Field Name | Field Type | Description |
---|---|---|
Label* Default Value: Snowflake - Delete | String | Specify the name for the instance. You can modify this to be more specific, especially if you have more than one of the same Snap in your |
...
Pipeline. |
Schema name |
---|
...
Default Value: N/A | String/Expression | Specify the database schema name. In case it is not defined, then the suggestion for the Table Name |
---|
...
retrieves all |
...
tables names of all schemas. The property is suggestible and will retrieve available database schemas during suggest values. |
...
Required. Table name to execute the delete on.
...
The values can be passed using the pipeline parameters but not the upstream parameter. |
Default value: [None]
Table name* Default Value: N/A | String/Expression | Specify the name of the table to execute bulk load operation on. The values can be passed using the pipeline parameters but not the upstream parameter. |
---|---|---|
Delete condition (deletes all records from table if left blank) Default |
...
Value: N/A | String/Expression | 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. |
---|
...
Specify a valid WHERE clause for the delete condition. If you leave this field blank, the Snap |
...
Examples:
Multiexcerpt include macro name ME_DB_Snaps_Query_Examples page Oracle - Update
Default value: [None]
...
deletes all the records from the table. Without using expressions
Using expressions
| ||
Number of retries Default value: 0 | Integer/Expression | 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 name retries page File Reader
...
. If the value is larger than 0, the Snap first downloads the target file into a temporary local file. If any error occurs during the download, the Snap waits for the time specified in the Retry interval and attempts to download the file again from the beginning. When the download is successful, the Snap streams the data from the temporary file to the downstream Pipeline. All temporary local files are deleted when they are no longer needed. Ensure that the local drive has sufficient free disk space to store the temporary local file. Minimum value: 0 | ||
Retry interval (seconds) Default value: 1 | Integer/Expression | 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 Default value: Continue to execute queued queries when the pipeline is stopped or if it fails Example: Cancel queued queries when the Pipeline is stopped or if it fails | Dropdown list | 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. |
---|
...
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
Default Value: Execute only | Dropdown list |
|
---|
...
Example
In the following example, the Snowflake Delete Snap deletes a record from the 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:
...
...
Snap Pack History
Expand | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|