I have successfully established the JDBC connection and can successfully execute statements like "use warehouse ...". When I try to run any SELECT statement I get the following error:
net.snowflake.client.jdbc.SnowflakeSQLLoggedException: JDBC driver internal error: Fail to retrieve row count for first arrow chunk: null.
I am able to see that my request was successful, and returned the expected data in the snowflake UI.
The error occurs on this line: rs = statement.executeQuery("select TOP 1 EVENT_ID from snowflake.account_usage.login_history");
The statement was able to execute queries prior to this line and the result set was as expected. Any insight would be appreciated!
This could happen due to several reasons:
-Djdk.module.illegalAccess=permit
This is a workaround until we get a fix for the following Apache Arrow issue ARROW-12747
ALTER SESSION SET JDBC_QUERY_RESULT_FORMAT='JSON'
Using DBeaver to connect snowflake and had the same issue. It is resolved by setting the session parameter in each editor window as following:
ALTER SESSION SET JDBC_QUERY_RESULT_FORMAT='JSON';
This solution can be automated by configuring boot-strap queries in connection settings->Initialization. With every new-editor window this session parameter will preset during initialization.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With