New to Kestra?
Use blueprints to kickstart your first workflows.
Trigger a Kestra workflow when a Snowflake query returns results. Automate event-driven pipelines based on new or updated rows in your Snowflake database.
Turn a Snowflake table into an event source. This blueprint polls a Snowflake query on a fixed interval and starts a Kestra workflow only when the query returns rows, so you can react to new or unprocessed records (new hires, new orders, pending events) without writing custom pollers or wiring up an external scheduler. It is a practical pattern for event-driven data pipelines built directly on top of your Snowflake warehouse.
io.kestra.plugin.jdbc.snowflake.Trigger named wait runs every PT1M (one minute) and executes the SQL SELECT * FROM KESTRA.PUBLIC.EMPLOYEES WHERE START_DATE = CURRENT_DATE() and UPDATE_TIMESTAMP IS NULL. With fetchType: FETCH, all matching rows are pulled into the execution context.{{ trigger.rows }}.io.kestra.plugin.core.flow.ForEach task named each iterates over {{ trigger.rows }} and, for every row, runs an automated_process task (io.kestra.plugin.scripts.shell.Commands on a Process runner) that echoes the row payload and a welcome message built from FIRST_NAME and LAST_NAME.io.kestra.plugin.jdbc.snowflake.Query task named update runs an UPDATE that stamps UPDATE_TIMESTAMP = SYSDATE() on the processed rows, so the same rows do not retrigger the flow on the next poll.UPDATE clears the trigger condition so each row is processed once.ForEach for clean, parallelizable processing.pluginDefaults, so the trigger and query reuse one URL, username, and password secret.Snowflake tasks and streams can detect change, but they cannot orchestrate multi-step downstream work, fan out per row, call shell scripts, or notify external systems. Kestra fills that gap: the SQL trigger turns a query result into a real event, ForEach parallelizes processing, retries and full execution logs give you observability and lineage, and everything is declared in version-controlled YAML instead of glue code. You also avoid double processing by combining the trigger predicate with a matching UPDATE (or DELETE).
KESTRA.PUBLIC.EMPLOYEES with START_DATE and UPDATE_TIMESTAMP columns).SNOWFLAKE_PASSWORD: the password for the Snowflake user, referenced as {{ secret('SNOWFLAKE_PASSWORD') }} in the trigger and query pluginDefaults.SNOWFLAKE_PASSWORD secret to your Kestra instance.url and username in pluginDefaults to point at your account and warehouse.sql, the WHERE clause, and the interval to match your table and polling needs.automated_process commands with your real downstream logic.UPDATE for a DELETE or a status-flag change to mark rows processed.interval for tighter or looser polling, and add retries on the query and process tasks.