New to Kestra?
Use blueprints to kickstart your first workflows.
Run SQL queries against a Snowflake data warehouse from Kestra. Automate data extraction, scheduled reporting, and analytics with declarative YAML workflows.
id: snowflake-query
namespace: company.team
tasks:
- id: query
type: io.kestra.plugin.jdbc.snowflake.Query
url: jdbc:snowflake://accountID.snowflakecomputing.com?warehouse=COMPUTE_WH
username: yourSnowflakeUser
password: "{{ secret('SNOWFLAKE_PASSWORD') }}"
fetchType: FETCH_ONE
sql: |
SELECT * FROM SNOWFLAKE_SAMPLE_DATA.TPCH_SF1.CUSTOMER
Run SQL against a Snowflake data warehouse directly from a Kestra workflow and make the results available to downstream tasks. This blueprint connects to Snowflake over JDBC, executes a query, and returns rows you can pass into reporting, transformation, or export steps. It solves the common problem of stitching Snowflake queries into a reliable, observable pipeline instead of running them ad hoc from a worksheet or a brittle script.
query task uses io.kestra.plugin.jdbc.snowflake.Query to connect to your Snowflake account.url points at your Snowflake JDBC endpoint and selects a warehouse (for example warehouse=COMPUTE_WH).username plus a password resolved from the SNOWFLAKE_PASSWORD secret, so no credentials live in the YAML.sql property holds the statement to run. The example selects from SNOWFLAKE_SAMPLE_DATA.TPCH_SF1.CUSTOMER.fetchType: FETCH_ONE returns only the first row. Use FETCH to return all rows in memory, or STORE to write results to Kestra internal storage as a downloadable file for large result sets.FETCH_ONE, FETCH, STORE) tuned to result size.Snowflake tasks and streams can schedule SQL inside the warehouse, but they cannot coordinate work beyond it. Kestra adds event and schedule triggers, automatic retries on transient failures, full execution lineage and logs, and declarative YAML that lives in Git. You can chain the Snowflake query to upstream loads and downstream exports, branching, and notifications, filling the cross-system orchestration gap Snowflake's own scheduler leaves open.
SNOWFLAKE_PASSWORD: the password for the Snowflake user in the username property.SNOWFLAKE_PASSWORD secret in your environment.url with your account identifier and target warehouse, and set username.sql to your table or query.fetchType to STORE and feed the output file into a downstream load or export task.Schedule trigger to run recurring extracts or reports.