Snowflake

Overview

The Snowflake Tool enables Dataworkz Agents to run SQL queries directly on Snowflake databases. It supports advanced query constructs and complex return types, making it more powerful than the Dataset tool. For simple tabular queries, the Dataset tool is recommended, but for more flexibility and native SQL support, use the Snowflake Tool.

When to Use

Use the Snowflake Tool when:

  • You need to query Snowflake databases directly.

  • Queries involve constructs beyond simple select statements.

  • Results require more complex return types than supported by the Dataset tool.

Prerequisites

  • A Snowflake connection must already be configured in Data Studio under the Configurations section.

  • The connection should include authentication and access to the required database.

Set up

Creating a Snowflake Tool

To create a Snowflake Tool, navigate to Agents > Create Tool and select Snowflake from the tool options.

About Tool

Provide clear details so Agents understand the purpose of this tool.

  • Tool Name: Enter a descriptive name.

  • Description: Add a short explanation of what the tool can do.

Configuration

The configuration defines how the tool connects to Snowflake and executes queries.

  • Storage: Choose the Snowflake connection configured in Data Studio.

  • Database: Select the Snowflake database to query.

  • Query:

    • Custom Parameterized Query: Write a SQL query with named parameters. Example:

    • Dynamic Query from Conversation: Use the full SQL query generated dynamically from the agent conversation.

Input Parameters

Any variables used in the query (such as ${productId}) automatically appear here. Specify the type and description for each parameter to make the tool easier to use.

Output

Define the expected structure of the query result. You can customize the format or test the tool to validate the output.

Validation

After setup, test the Snowflake Tool by providing values for the input parameters and running the query. Review the returned output to confirm that the query executes successfully.

Last updated