Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snowflake trigger not working: choosing warehouse #364

Open
MarthaScheffler opened this issue Aug 26, 2024 · 0 comments
Open

Snowflake trigger not working: choosing warehouse #364

MarthaScheffler opened this issue Aug 26, 2024 · 0 comments
Assignees
Labels
area/plugin Plugin-related issue or feature request bug Something isn't working good first issue Great issue for new contributors

Comments

@MarthaScheffler
Copy link

MarthaScheffler commented Aug 26, 2024

Expected Behavior

When I use the Snowflake jdbc trigger, I want to be able to choose the virtual warehouse used in that session.
Either via the Kestra parameter "warehouse", or by firing several SQL commands, "USE WAREHOUSE WH; SELECT 1;"
neither is working. only workaround is to give the authenticated user a default warehouse.

(the actual jdbc tasks also seem to work fine, at least for the Query I could set a warehouse and it got used)

Actual Behaviour

Error when using the Kestra parameter "warehouse":

net.snowflake.client.jdbc.SnowflakeSQLException: No active warehouse selected in the current session. Select an active warehouse with the ‘use warehouse’ command.

Error when firing 2 SQL commands in the same session:

net.snowflake.client.jdbc.SnowflakeSQLException: Actual statement count 2 did not match the desired statement count 1.

multi-statement support from Snowflake's SQL-api: https://docs.snowflake.com/en/developer-guide/sql-api/submitting-multiple-statements#specifying-multiple-sql-statements-in-the-request

Steps To Reproduce

  1. using the code from https://kestra.io/plugins/plugin-jdbc-snowflake/triggers/io.kestra.plugin.jdbc.snowflake.trigger
  2. setting additionally a warehouse
  3. changing the sql to "SELECT WAREHOUSE my_warehouse; SELECT * FROM demo_db.public.customers;"

Environment Information

  • Kestra Version: 0.18.3
  • Plugin version: ?
  • Operating System (OS / Docker / Kubernetes): kubernetes
  • Java Version (If not docker):

Example flow

No response

@MarthaScheffler MarthaScheffler added the bug Something isn't working label Aug 26, 2024
@kestrabot kestrabot bot added this to Issues Aug 26, 2024
@github-project-automation github-project-automation bot moved this to Backlog in Issues Aug 26, 2024
@MarthaScheffler MarthaScheffler changed the title Snowflake choosing warehouse not working Snowflake trigger not working: choosing warehouse & found 'null' rows Aug 26, 2024
@MarthaScheffler MarthaScheffler changed the title Snowflake trigger not working: choosing warehouse & found 'null' rows Snowflake trigger not working: choosing warehouse Aug 26, 2024
@anna-geller anna-geller added the area/plugin Plugin-related issue or feature request label Aug 26, 2024
@tchiotludo tchiotludo added good first issue Great issue for new contributors and removed kind/good-first-issue labels Oct 1, 2024
mgabelle added a commit that referenced this issue Nov 14, 2024
pass warehouse and database value to the Query task

#364
mgabelle added a commit that referenced this issue Nov 14, 2024
pass warehouse and database value to the Query task

#364
mgabelle added a commit that referenced this issue Nov 14, 2024
* fix(snowflake): Trigger not working when selecting warehouse

pass warehouse and database value to the Query task

* doc(snowflake): update trigger flow sample

#364
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/plugin Plugin-related issue or feature request bug Something isn't working good first issue Great issue for new contributors
Projects
Status: In review
Development

No branches or pull requests

4 participants