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

when connection to snowflake, ALTER SESSION SET JDBC_QUERY_RESULT_FORMAT='JSON'; is required #65

Open
robert-s-lee opened this issue Apr 30, 2023 · 1 comment

Comments

@robert-s-lee
Copy link

without ALTER SESSION SET JDBC_QUERY_RESULT_FORMAT='JSON';, without it, : JDBC driver internal error: Fail to retrieve row count for first arrow chunk: null. is given.

 1> select * from information_schema.databases;
SQL Exception(s) Encountered:
[State: XX000][Code: 200001]: JDBC driver internal error: Fail to retrieve row count for first arrow chunk: null.
 1> ALTER SESSION SET JDBC_QUERY_RESULT_FORMAT='JSON';
ok. (total: 0.138s)
 1> select * from information_schema.databases;
+-----------------------+----------------+--------------+---------------------------------------------------+-------------------------+-------------------------+----------------+
| DATABASE_NAME         | DATABASE_OWNER | IS_TRANSIENT | COMMENT                                           | CREATED                 | LAST_ALTERED            | RETENTION_TIME |
+-----------------------+----------------+--------------+---------------------------------------------------+-------------------------+-------------------------+----------------+
| SNOWFLAKE_SAMPLE_DATA | ACCOUNTADMIN   | NO           | Provided by Snowflake during account provisioning | 2023-04-30 17:10:15.739 | 2023-04-30 17:10:15.739 |              1 |
| arcsrc                | ACCOUNTADMIN   | NO           | [NULL]                                            | 2023-04-30 17:36:52.839 | 2023-04-30 17:36:52.897 |              1 |
+-----------------------+----------------+--------------+---------------------------------------------------+-------------------------+-------------------------+----------------+
2 rows in results(first row: 0.519s; total: 0.520s)
 1> select * from t1;
@robert-s-lee
Copy link
Author

https://community.snowflake.com/s/article/JDBC-Driver-Compatibility-Issue-With-JDK-16-and-Later reference that works

export JSQSH_JAVA_OPTS="--add-opens java.base/java.nio=ALL-UNNAMED"  
jsqsh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant