Arrow Fallback To JSON
- Last Updated: March 3, 2025
- 1 minute read
- DataDirect Connectors
- ODBC
- Snowflake 8.0
- Documentation
Attribute
ArrowFallbackToJson (aftj)
Purpose
Specifies whether the driver uses the JSON query format when the arrow format is not properly initialized. The driver uses a high-speed arrow transfer that requires the restricted APIs from java.nio package. For JVMs that are Java SE 16 (or equivalent) and higher, the following JVM value must be set to use arrow transfer:
--add-opens=java.base/java.nio=ALL-UNNAMED
If this value is not specified, the API throws an InaccessibleObjectException during query execution. To allow you to continue executing queries in this scenario, you can set this option to configure the driver to fall back to the JSON query format when the JVM is not properly configured.
Valid Values
0 | 1 | 2
Behavior
If set to 0 (Enable), the driver falls back to JSON query format if the arrow APIs can not be initialized
using Java SE 16 and higher,
and a CONFIG-level message is logged.
If set to 1 (Warn), the driver falls back to JSON query format if the arrow APIs can not be initialized
using Java SE 16 and higher,
and a WARN-level message is logged.
If set to 2 (Disable), the driver does not fall back to JSON query format if arrow APIs can not be initialized,
and the driver throws a SQLException when executing a SELECT query that uses arrow transfer.
Notes
-
The recommended practice is to configure the JVM with the
--add-opens=java.base/java.nio=ALL-UNNAMEDoption value and disable this connection option. This configuration provides the best performance. -
Alternatively, your application can set JSON query format for the session by executing the
ALTER SESSION SET JDBC_QUERY_RESULT_FORMAT='JSON'statement. -
This connection option can affect performance.
Default Value
0 (Enable)