Snowflake SQL Query

The Snowflake SQL Query processor performs a specified Snowflake SQL query to transform data.

When you configure the Snowflake SQL Query processor, you define a valid Snowflake SQL query using the $table variable to represent the data entering the processor.

You might use the Snowflake SQL Query processor when you want to leverage an existing query or when you want to create a complex query.
Tip: The Snowflake SQL Query processor allows only one input stream. If you have multiple input streams that you want to pass to the processor, join or merge the data before passing it to the processor.

Example

Say you have a Snowflake SQL query that performs an unpivot of your incoming data. You could configure a Unpivot processor to unpivot the data, but since you know that the query works, you prefer to just use the query.

To do this, you connect the Snowflake SQL Query processor to the origin. You specify your query in the processor, modifying it to use the $table variable to represent incoming data, as follows:

select * from $table
unpivot(hours for day_of_week in (MON, TUE, WED, THU, FRI, SAT, SUN))

Then, you connect additional processors to the Snowflake SQL Query processor to perform downstream processing.

Configuring a Snowflake SQL Query Processor

Configure a Snowflake SQL Query processor to use a Snowflake SQL query to transform data.

  1. On the General tab, configure the following properties:
    General Property Description
    Name Stage name.
    Description Optional description.
    Cache Data Caches processed data.
  2. On the Query tab, define the SQL query to perform in the Query property.
    Specify a valid Snowflake SQL query using the $table variable to represent incoming data.
    For example, SELECT * FROM $table includes all columns in the incoming rows in the query.
    For information about Snowflake SQL queries, see the Snowflake documentation.