Snowflake - Vector Search

Overview

You can use this Snap to perform advanced vector-based queries using the SELECT statement.


Snowflake Vector Search Configuration

Prerequisites

A valid account with the required permissions.

Snap views

View Description Examples of upstream and downstream Snaps
Input
  • Requires an input vector with the same dimension as the selected vector column.
  • Requires a vector input with an array of float/int data types.
Output For each input document, all results are grouped in a single output document
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. The available options are:

  • Stop Pipeline Execution Stops the current pipeline execution when an error occurs.
  • Discard Error Data and Continue Ignores the error, discards that record, and continues with the remaining records.
  • Route Error Data to Error View Routes the error data to an error view without stopping the Snap execution.

Learn more about Error handling in Pipelines.

Snap settings

Legend:
  • Expression icon (): Allows using JavaScript syntax to access SnapLogic Expressions to set field values dynamically (if enabled). If disabled, you can provide a static value. Learn more.
  • SnapGPT (): Generates SnapLogic Expressions based on natural language using SnapGPT. Learn more.
  • Suggestion icon (): Populates a list of values dynamically based on your Snap configuration. You can select only one attribute at a time using the icon. Type into the field if it supports a comma-separated list of values.
  • Upload : Uploads files. Learn more.
Learn more about the icons in the Snap settings dialog.
Field / Field set Type Description
Label String Required. Specify a unique name for the Snap. Modify this to be more appropriate, especially if there are more than one of the same Snap in the pipeline.
Schema name String/Expression/ Suggestion Specify the schema name for searching for a vector.

Default value: N/A

Example: VECTOR_DEMO

Table Name String/Expression/ Suggestion Required. Specify the table name for searching for a vector.

Default value: N/A

Example: VECTOR_DEMO.BOOKS

Vector column String/Expression/ Suggestion Required. Specify the vector column name to search.

Default value: N/A

Example: INT_VEC

Similarity function Dropdown list Required. Select the similarity functions for comparing vectors. The available options are:
  • L2: Computes the L2 distance between two vectors. The similarity scores are sorted in ascending order.
  • COSINE: Computes the cosine similarity between two vectors.The similarity scores are sorted in descending order.
  • INNER PRODUCT: Computes the inner product of two vectors.The similarity scores are sorted in descending order.
Learn more about the Vector Similarity Functions.

Default value: L2

Example: COSINE

Where Clause String/Expression/ Suggestion Specify the where clause to use in the vector search query statement.
Note:
  • The Snap does not suggest the columns of the vector data type.
  • The Snap suggests _SL_SIMILARITY_SCORE if you select the Include scores checkbox.

Default value: N/A

Example: ID > '001i0000007FVjpAAG'

Limit rows Integer/Expression Specify the number of results to return for each query.

Default value: 4

Example: 3

Min Value: 1
Include values Checkbox/Expression Select this checkbox to include vector values in the response.
Note: This field does not support input schema from the upstream Snaps.

Default status: Deselected

Include scores Checkbox/Expression Select this checkbox to include similarity scores in the response.
Note:
  • This field supports input schema from the upstream Snaps.
  • The Snap displays _SL_SIMILARITY_SCORE in the output preview if you select this checkbox.

Default status: Selected

Number of retries Integer/Expression Specify the maximum number of attempts to be made to receive a response.

Minimum Value: 0

Default value: 0

Example: 3

Retry interval (seconds) Integer/Expression Specify the minimum number of seconds the Snap must wait before each retry attempt.

Minimum Value: 1

Default value: 0

Example: 3

Handle Timestamp and Date Time Data Dropdown list Select how you want the Snap to handle the timestamp and date time data. The available options are:
  • Default Date Time format in UTC Time Zone: The Snowflake date time data are represented in UTC Time Zone.
  • SnapLogic Date Time format in Regional Time Zone: The Snowflake date time data are represented in the same regional time zone value, as provided in the Snowflake account.

Default value: Default Date Time format in UTC Time Zone

Example: SnapLogic Date Time format in Regional Time Zone

Snap execution Dropdown list Choose one of the three modes in which the Snap executes.
Available options are:
  • Validate & Execute. Performs limited execution of the Snap and generates a data preview during pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during pipeline runtime.
  • Execute only. Performs full execution of the Snap during pipeline execution without generating preview data.
  • Disabled. Disables the Snap and all Snaps that are downstream from it.

Temporary files

During execution, data processing on Snaplex nodes occurs principally in-memory as streaming and is unencrypted. When processing larger datasets that exceed the available compute memory, the Snap writes unencrypted pipeline data to local storage to optimize the performance. These temporary files are deleted when the pipeline execution completes. You can configure the temporary data's location in the Global properties table of the Snaplex node properties, which can also help avoid pipeline errors because of the unavailability of space. Learn more about Temporary Folder in Configuration Options.

Troubleshooting

None.