On this Page
...
Select statement and transactional statements such as Begin, Commit, and Rollback are not supported.
Changes made to the database using Data Definition Language (DDL) queries are not rolled back if the Snap fails, this is since DDL statements are always auto-committed by default.
If there is one DDL query among other queries that the Snap is executing, then the rollback is only for the changes made by the queries executed after the DDL query. Ensure that the Disable session auto-commit property is selected when using DDL queries. See Snowflake Auto-commit for details. This is not applicable to Data Modification Language (DML) queries.User-defined functions (UDFs) created in the Snowflake console can be executed using Snowflake - Multi Execute Snap. See Snowflake Multi Execute-Examples.
Snap Views
Type | Format | Number of Views | Examples of Upstream and Downstream Snaps | Description |
---|---|---|---|---|
Input | Document |
|
| While the Snap does not require an input document, it supports document input and generates document outputs. Snaps that accept or generate documents can be used upstream or downstream of the Snap. |
Output | Document
|
|
| The Snap will output one document for every record retrieved, hence any document processing Snap can be used downstream. |
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 - |
Multi Execute |
---|
Snowflake - Multi Execute | String | Specify a unique name for the Snap. You can modify this to be more appropriate, especially if you have more than one of the same Snap in your pipeline. |
---|---|---|
SQL Statements* Default Value: N/A Example: INSERT into SnapLogic.book (id, book) VALUES ($id,$book) | String/Expression | Specify the Snowflake SQL statement to execute on the server. Provide the queries to be executed by the Snap. End each query with a semi-colon, except the last query. To add another query, click the + to add a row and there add the query. Using Where ClausesValid JSON paths that are defined in the WHERE clause for queries/statements are substituted with values from an incoming document. If the error view is enabled, documents are written to the error view if the document is missing a value to be substituted into the query/statement. |
Without using expressions
Using expressions
| |||||||||||||
Session auto-commit Default Value: Selected | Checkbox | Select this to enable the session's auto-commit. This is useful when using DDL queries since the changes made by such queries cannot be rolled back if the Snap/pipeline fails. If deselected, changes made by DML queries can be rolled back or changes made by DML queries after a DDL queries can be rolled back. | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Use Result Query Default Value: Deselected | Checkbox | Select this property to write the result of each of the query execution, in case of multiple queries, to Snap's output view after the successful execution. The output of the Snap will be enclosed within the key, Result Query and the value will be the actual output produced by the SQL query. The option would allow users to effectively track the query's execution by clearly indicating the successful executions and the number of records affected, if any, after the execution. | |||||||||||
Manage Queued Queries Default Value: Continue to execute queued queries when pipeline is stopped or if it fails |
Dropdown list |
Choose an option to determine whether the Snap should continue or cancel the execution of the queued |
queries when |
the pipeline stops or fails. 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 type of queries under execution is not canceled. Snowflake internally determines which queries are safe to be canceled and cancels those queries. | ||||||
Default Value: Execute only |
---|
Dropdown list |
|
Troubleshooting
Examples
...
Warning
Unable to set auto-commit for this connection (Session ID: <Session ID number>
)
Resolution
Manually terminate the session via the Snowflake console. Learn more: How to terminate a session in Snowflake.
Examples
Process multiple queries in a single transaction
The following example pipeline demonstrates how to process multiple Snowflake queries in a single transaction.
...