jsqsh
jsqsh copied to clipboard
when connection to snowflake, ` ALTER SESSION SET JDBC_QUERY_RESULT_FORMAT='JSON';` is required
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;
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