On this Page
...
From 4.30 Release, the Snowflake - Select Snap writes the output value as-is for FLOAT or DOUBLE datatype columns if these columns have the value as NaN (Not a Number). Earlier, the Snap displayed an exception error when the FLOAT or DOUBLE datatype column has the value as NaN. This behavior is not backward compatible.
Snap Views
Type | Format | Number of Views | Examples of Upstream and Downstream Snaps | Description |
---|---|---|---|---|
Input | Document |
|
| This Snap has at most one document input view. A document that provides values for one or more properties of the Snap or simply for pass-through purpose. A dynamic where clause can be defined by providing values upstream. As the Mapper Snap can provide constants, pipeline parameters mapped into variables then can be used in the where clause or even in the table/schema properties. |
Output | Document |
|
| This Snap has one document output view by default. A second view can be added to show the metadata for the table as a Document. The metadata document can then be fed into the second input view of Snowflake - Insert or Bulk Load Snaps so that the table is created in Snowflake with a similar schema as the source table. The Snap will output one document for every record retrieved, hence any document processing Snap can be used downstream. Document for each record retrieved. Special types such as TIMESTAMP, TIME are converted into SnapLogic internal date type representations which then can be consumed by downstream Snaps just like any other data type. |
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*
| String | Specify 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 Default Value: N/A | String/Expression | 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. | |||||||||||||
Table Name* Default Value: N/A | String/Expression | Specify the table to execute the select query on. | |||||||||||||
Where Clause Default Value: N/A | String/Expression | Specify the where clause of the SELECT statement. This supports document value substitution (such as $person.firstname will be substituted with the value found in the incoming document at the path). | |||||||||||||
Order By | Use this fieldset to specify the columns in the order in which you want to sort the database. The default database sort order will be used. | ||||||||||||||
Column Names Default Value: N/A | String/Expression | Specify the column names. | |||||||||||||
Limit offset Default Value: N/A | Integer/Expression | Specify the offset for the limit clause. This is where the result set should start. | |||||||||||||
Limit rows Default Value: N/A | Integer/Expression | Specify the number of rows to return from the query. | |||||||||||||
Output fields Default Value: N/A Example: email, | String/Expression | Enter or select output fields for Snowflake SQL SELECT statement. To select all fields, leave it at default. | |||||||||||||
Fetch Output Fields In Schema Default Value: Deselected | Checkbox | Select this check box to include only the selected fields or columns in the Output Schema (second output view). If you do not provide any Output fields, all the columns are visible in the output. | |||||||||||||
Pass-through Default Value: Selected | Checkbox | Select to make the input document will be pass through the output view under the key 'original'. | |||||||||||||
Ignore empty result Default Value: Deselected | Checkbox | Select if you want no document to be written to the output view when a SELECT operation does not produce any result. If this property is not selected and the Pass-through property is selected, the input document will be passed through to the output view. | |||||||||||||
Match data types Default Value: Deselected | Checkbox | Conditional. This field applies only when the Output fields field is provided with any values. If this checkbox is selected, the Snap tries to match the output data types the same as when the Output fields property is empty (SELECT * FROM ...). The output preview would be in the same format as the one when SELECT * FROM is implied and all the contents of the table are displayed. | |||||||||||||
Number of Retries Default Value: 0 | Integer/Expression | 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/Expression | Specify the time interval between two successive retry requests. A retry happens only when the previous attempt resulted in an exception. | |||||||||||||
Staging mode | Dropdown list | Required when the value in the Number of retries field is greater than 0. Specify the location from the following options to store input documents between retries:
| |||||||||||||
Handle Timestamp and Date Time Data Default Value: Default Date Time format in UTC Time Zone | Dropdown list/Expression | 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 the Pipeline is stopped or if it fails | Dropdown list | Select this checkbox 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: Validate & Execute | Dropdown list |
|
For the 'Suggest' in the Order by columns and the Output fields properties, the value of the Table name property should be an actual table name instead of an expression. If it is an expression, it will display an error message "Could not evaluate accessor: ..." when the 'Suggest' button is clicked. This is because, at the time the "Suggest" button is clicked, the input document is not available for the Snap to evaluate the expression in the Table name property. The input document is available to the Snap only during the preview or execution time.
Examples
...
The following example illustrates how to read table data using the Snowflake - Select Snap.
...
The above Snap reads test@test table data, and orders the results based on the C1 column. Additionally, it limits the results to only 10 rows.
Successful execution of the Pipelines gives the following output in the preview:
...
Snap Pack History
Expand | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|