-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
[destination-snowflake] Confusing Error - No active warehouse selected in the current session...
This should be a config error and mention permissions
#40615
Comments
I found even "test the destination" succeed, but when actually run the job, I still got error no matter which Snowflake destination connector version: 2024-07-01 05:37:10 destination > WARN type-and-dedupe c.z.h.p.ProxyConnection(checkException):178 HikariPool-1 - Connection net.snowflake.client.jdbc.SnowflakeConnectionV1@d66a18f marked as broken because of SQLSTATE(57P03), ErrorCode(606) net.snowflake.client.jdbc.SnowflakeSQLException: No active warehouse selected in the current session. Select an active warehouse with the 'use warehouse' command.
at net.snowflake.client.jdbc.SnowflakeUtil.checkErrorAndThrowExceptionSub(SnowflakeUtil.java:144) ~[snowflake-jdbc-3.14.1.jar:3.14.1]
at net.snowflake.client.jdbc.SnowflakeUtil.checkErrorAndThrowException(SnowflakeUtil.java:77) ~[snowflake-jdbc-3.14.1.jar:3.14.1]
at net.snowflake.client.core.StmtUtil.pollForOutput(StmtUtil.java:501) ~[snowflake-jdbc-3.14.1.jar:3.14.1]
at net.snowflake.client.core.StmtUtil.execute(StmtUtil.java:407) ~[snowflake-jdbc-3.14.1.jar:3.14.1]
at net.snowflake.client.core.SFStatement.executeHelper(SFStatement.java:482) ~[snowflake-jdbc-3.14.1.jar:3.14.1]
at net.snowflake.client.core.SFStatement.executeQueryInternal(SFStatement.java:199) ~[snowflake-jdbc-3.14.1.jar:3.14.1]
at net.snowflake.client.core.SFStatement.executeQuery(SFStatement.java:133) ~[snowflake-jdbc-3.14.1.jar:3.14.1]
at net.snowflake.client.core.SFStatement.execute(SFStatement.java:769) ~[snowflake-jdbc-3.14.1.jar:3.14.1]
at net.snowflake.client.core.SFStatement.execute(SFStatement.java:677) ~[snowflake-jdbc-3.14.1.jar:3.14.1]
at net.snowflake.client.jdbc.SnowflakeStatementV1.executeQueryInternal(SnowflakeStatementV1.java:267) ~[snowflake-jdbc-3.14.1.jar:3.14.1]
at net.snowflake.client.jdbc.SnowflakePreparedStatementV1.executeQuery(SnowflakePreparedStatementV1.java:122) ~[snowflake-jdbc-3.14.1.jar:3.14.1]
at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52) ~[HikariCP-5.1.0.jar:?]
at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java) ~[HikariCP-5.1.0.jar:?]
at io.airbyte.cdk.db.jdbc.DefaultJdbcDatabase.unsafeQuery(DefaultJdbcDatabase.java:129) ~[airbyte-cdk-core-0.23.2.jar:?]
at io.airbyte.cdk.db.jdbc.JdbcDatabase.unsafeQuery(JdbcDatabase.java:200) ~[airbyte-cdk-core-0.23.2.jar:?]
at io.airbyte.cdk.db.jdbc.JdbcDatabase.queryJsons(JdbcDatabase.java:216) ~[airbyte-cdk-core-0.23.2.jar:?]
at io.airbyte.integrations.destination.snowflake.typing_deduping.SnowflakeV1V2Migrator.doesAirbyteInternalNamespaceExist(SnowflakeV1V2Migrator.java:42) ~[io.airbyte.airbyte-integrations.connectors-destination-snowflake.jar:?]
at io.airbyte.integrations.base.destination.typing_deduping.BaseDestinationV1V2Migrator.doesValidV2RawTableAlreadyExist(BaseDestinationV1V2Migrator.java:114) ~[airbyte-cdk-typing-deduping-0.23.2.jar:?]
at io.airbyte.integrations.base.destination.typing_deduping.BaseDestinationV1V2Migrator.shouldMigrate(BaseDestinationV1V2Migrator.java:47) ~[airbyte-cdk-typing-deduping-0.23.2.jar:?]
at io.airbyte.integrations.base.destination.typing_deduping.BaseDestinationV1V2Migrator.migrateIfNecessary(BaseDestinationV1V2Migrator.java:27) ~[airbyte-cdk-typing-deduping-0.23.2.jar:?]
at io.airbyte.integrations.base.destination.typing_deduping.DefaultTyperDeduper.lambda$runMigrationsAsync$0(DefaultTyperDeduper.java:138) ~[airbyte-cdk-typing-deduping-0.23.2.jar:?]
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804) ~[?:?]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
Stack Trace: net.snowflake.client.jdbc.SnowflakeSQLException: No active warehouse selected in the current session. Select an active warehouse with the 'use warehouse' command.
at net.snowflake.client.jdbc.SnowflakeUtil.checkErrorAndThrowExceptionSub(SnowflakeUtil.java:144)
at net.snowflake.client.jdbc.SnowflakeUtil.checkErrorAndThrowException(SnowflakeUtil.java:77)
at net.snowflake.client.core.StmtUtil.pollForOutput(StmtUtil.java:501)
at net.snowflake.client.core.StmtUtil.execute(StmtUtil.java:407)
at net.snowflake.client.core.SFStatement.executeHelper(SFStatement.java:482)
at net.snowflake.client.core.SFStatement.executeQueryInternal(SFStatement.java:199)
at net.snowflake.client.core.SFStatement.executeQuery(SFStatement.java:133)
at net.snowflake.client.core.SFStatement.execute(SFStatement.java:769)
at net.snowflake.client.core.SFStatement.execute(SFStatement.java:677)
at net.snowflake.client.jdbc.SnowflakeStatementV1.executeQueryInternal(SnowflakeStatementV1.java:267)
at net.snowflake.client.jdbc.SnowflakePreparedStatementV1.executeQuery(SnowflakePreparedStatementV1.java:122)
at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)
at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)
at io.airbyte.cdk.db.jdbc.DefaultJdbcDatabase.unsafeQuery(DefaultJdbcDatabase.java:129)
at io.airbyte.cdk.db.jdbc.JdbcDatabase.unsafeQuery(JdbcDatabase.java:200)
at io.airbyte.cdk.db.jdbc.JdbcDatabase.queryJsons(JdbcDatabase.java:216)
at io.airbyte.integrations.destination.snowflake.typing_deduping.SnowflakeV1V2Migrator.doesAirbyteInternalNamespaceExist(SnowflakeV1V2Migrator.java:42)
at io.airbyte.integrations.base.destination.typing_deduping.BaseDestinationV1V2Migrator.doesValidV2RawTableAlreadyExist(BaseDestinationV1V2Migrator.java:114)
at io.airbyte.integrations.base.destination.typing_deduping.BaseDestinationV1V2Migrator.shouldMigrate(BaseDestinationV1V2Migrator.java:47)
at io.airbyte.integrations.base.destination.typing_deduping.BaseDestinationV1V2Migrator.migrateIfNecessary(BaseDestinationV1V2Migrator.java:27)
at io.airbyte.integrations.base.destination.typing_deduping.DefaultTyperDeduper.lambda$runMigrationsAsync$0(DefaultTyperDeduper.java:138)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583) |
It turns out a false alarm. I think all verisons including latest v3.10.1 all work well! I actually made several mistakes. Here are tips to make it work, let's based on this Snowflake destination settings:
Hope it helps future users! I will leave this open as I feel the error is kind of misleading, maybe worth to throw different errors such as
|
@airbytehq/destinations can someone take a look into this? |
No active warehouse selected in the current session...
This should be a config error and mention permissions
Can I take a jab at this as a first time contributor? I see the only time that string is used is at:
It seems like a pretty generic catch all error message so I can just edit the ERROR Message (NO_ACTIVE_WAREHOUSE_ERR_MSG) to allude to a permission issue as well. |
@airbytehq/destinations would be someone able to check the suggestion to fix the issue? Thanks! |
@HishamAssi - sure, please link the PR once you have it ready |
We'll tackle this in-house |
At Airbyte, we seek to be clear about the project priorities and roadmap. This issue has not had any activity for 180 days, suggesting that it's not as critical as others. It's possible it has already been fixed. It is being marked as stale and will be closed in 20 days if there is no activity. To keep it open, please comment to let us know why it is important to you and if it is still reproducible on recent versions of Airbyte. |
Connector Name
destination-snowflake
Connector Version
v3.9.0 ~ v3.10.1 have the issue.(Turns out false alarm, please check comment here)What step the error happened?
Configuring a new connector
Relevant information
I found this bug starts to show since destination-snowflake v3.9.0, v3.10.1 (latest as of today) also has this issue.
However, v3.8.4 works well.
Here is my Terraform config
Relevant log output
v3.8.4
Here is the screenshot when test the destination:
v3.9.0 to v3.10.1 (latest as of today)
Here is the screenshot when test the destination:
airbyte-worker log:
Contribute
The text was updated successfully, but these errors were encountered: