Snowflake with key pair icon

Snowflake with key pair

Get, add and update data in Snowflake

Overview

This node provides integration with Snowflake, a cloud-based data warehousing service. It allows users to perform common database operations such as executing arbitrary SQL queries, inserting rows into tables, and updating existing rows in tables.

Typical use cases include:

  • Running custom SQL queries to retrieve or manipulate data.
  • Bulk inserting new records into a Snowflake table from incoming workflow data.
  • Updating existing records based on a key column, useful for synchronizing or modifying datasets.

For example, you could use this node to:

  • Execute a SELECT query to fetch product information.
  • Insert multiple new customer records into a "customers" table.
  • Update the status of orders in an "orders" table based on order IDs.

Properties

Name Meaning
Authentication The method used to authenticate with Snowflake. Options:
- Snowflake Password
- Snowflake JWT (key pair)
- Browser
Operation The database operation to perform. Options:
- Execute Query: Run a custom SQL query
- Insert: Insert rows into a table
- Update: Update rows in a table
Query (Only for Execute Query) The SQL query string to execute.
Table (For Insert and Update) The name of the target table in Snowflake.
Columns (For Insert and Update) Comma-separated list of columns to insert or update.
Update Key (For Update) The column name used to identify which rows to update (e.g., "id").

Output

The node outputs JSON data representing the results of the executed operations:

  • For Execute Query, the output is the result set returned by the SQL query, structured as an array of objects where each object corresponds to a row.
  • For Insert, the output contains the inserted rows as JSON objects reflecting the input data.
  • For Update, the output contains the updated rows as JSON objects reflecting the input data.

No binary data output is produced by this node.

Dependencies

  • Requires valid Snowflake credentials configured in n8n, supporting one of the authentication methods: password, JWT key pair, or browser-based authentication.
  • Uses internal helper functions to create and manage connections to Snowflake.
  • No external environment variables are explicitly required beyond credential setup.

Troubleshooting

  • Connection issues: Ensure that the provided Snowflake credentials are correct and have sufficient permissions for the requested operations.
  • SQL errors: Invalid SQL syntax or referencing non-existent tables/columns will cause query execution failures. Verify your SQL statements carefully.
  • Missing columns: When inserting or updating, ensure the specified columns exist in the target table and match the input data properties.
  • Update key missing in columns: For update operations, the update key column must be included in the columns list; otherwise, the node prepends it automatically.
  • Browser authentication: If using browser authentication, the connection is reused across executions. If connection fails, try reconnecting or switching authentication methods.

Links and References

Discussion