...
You can use this Snap to execute arbitrary Snowflake SQL. This Snap works only with single queries.
...
The Snap substitutes the valid JSON paths that are defined in the WHERE clause for queries/statements with the values present in the incoming document. If the incoming document does not carry a substituting value, the document is written to the error view. If the Snap executes a SELECT query, it merges the query results into the incoming document and overwrites the values of all existing keys. On the other hand, the Snap writes the original document if there are no results from the query. If an output view is available and an UPDATE/INSERT/MERGE/DELETE statement is executed, the original document that was used to create the statement becomes output with the status of the statement executed.
...
Field Name | Field Type | Description | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Label* Default Value: Snowflake - Execute | String | Specify the name for the Snap. You can make the name more specific, especially if your Pipeline has more than one of the same Snap. | |||||||||||||||||
SQL Statement* 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. We recommend you to add a single query in the SQL Statement field. Document value substitution is performed on literals starting with '$', for example, $people.name is substituted with its value available in the incoming document. In DB Execute Snaps, if the Snowflake SQL statement is not an expression, the JSON path, such as $para, is allowed in the WHERE clause only. If the query statement starts with SELECT (case-insensitive), the Snap regards it as a select-type query and executes once per input document. If not, the Snap regards it as a write-type query and executes in batch mode. This Snap does not allow you to inject Snowflake SQL, for example, select * from people where $columnName = abc.
| |||||||||||||||||
Query type
Default Value: Auto | Dropdown list/Expression | Select the type of query for your SQL statement (Read or Write). When Auto is selected, the Snap tries to determine the query type automatically. | |||||||||||||||||
Pass through Default Value: Selected | Checkbox | Select this checkbox to enable the Snap to pass the input document to the output view under the key named | |||||||||||||||||
Ignore empty result Default Value: Deselected | Checkbox | Select this checkbox to not write any document to the output view when a SELECT operation does not produce any result. If this checkbox is not selected and the Pass-through checkbox is selected, the input document is passed through to the output view. | |||||||||||||||||
Number of Retries Default Value: 0 | Integer | 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. 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 | Specify the time interval between two successive retry requests. A retry happens only when the previous attempt resulted in an exception. | |||||||||||||||||
Use Result Query Default Value: Deselected | Checkbox | Select this checkbox to write the query execution result to the Snap's output view after the successful execution. The output of the Snap will be enclosed within the key This option allows users to effectively track the query's execution by clearly indicating the successful execution and the number of records affected, if any, after the execution. | |||||||||||||||||
Handle Timestamp and Date Time Data Default value: Default Date Time format in UTC Time Zone Example: SnapLogic Date Time format in Regional Time Zone | Dropdown list | Specify how the Snap must handle timestamp and date time data. The available options are:
| |||||||||||||||||
Manage Queued Queries Default value: Continue to execute queued queries when pipeline is stopped or if it fails Example: Cancel queued queries when the Pipeline is stopped or if it fails | Dropdown list | Select an option from the list to determine whether the Snap should continue or cancel the execution of the queued Snowflake Execute SQL queries when you stop the Pipeline. The available options are:
If you select Cancel queued queries when pipeline is stopped or if it fails, the read queries under execution are canceled, whereas the write type of queries under execution are not canceled. Snowflake internally determines which queries are safe to be canceled and cancels those queries. | |||||||||||||||||
Default Value: Execute only | Dropdown list |
|
...