Source
Analyzing queries and troubleshooting with Snowpark Java
This is because Snowpark uses the Apache Arrow connector, which depends on internal Java APIs that are not exposed by default after Java 9. To work around this error, set the following parameter either as a command - line argument when…
Exception 'java.net.UnknownHostException' when connecting to scoped stage file URLs within Snowpark Java functions
CAUSE: Snowpark (Java, Scala, Python, etc.) functions execute in secure sandboxes over the Snowflake virtual warehouses and are not permitted to make any network related syscalls, including DNS resolution.
JDBC driver throws javax.naming.CommunicationException: DNS error (Root exception: java.net.SocketTimeoutException)
ISSUE: The following exception occurs on macOS (aarch64) when using the JDBC driver’s diagnostic feature (i.e., ENABLE_DIAGNOSTICS=TRUE)1: javax.naming.CommunicationException: DNS error [Root exception is java.net.SocketTimeoutException];…
JDBC Driver Compatibility Issue With JDK 16 and Later: Exception creating result java.lang.ExceptionInInitializerError at net.snowflake.client.jdbc.internal.apache.arrow.memory.UnsafeAllocationManager
CAUSE: The failure is directly caused by one of the JDBC driver's dependencies, Apache Arrow, when attempting to use reflection in order to access a private member of the java.
Java requirements for the JDBC Driver
The Snowflake JDBC driver requires Java LTS (Long - Term Support) versions 1.8 or higher. If the minimum required version of Java is not installed on the client machines where the JDBC driver is installed, you must install either Oracle Java…
JDBC driver with -Dhttp.nonProxyHosts=* set throws java.lang.StringIndexOutOfBoundsException: begin 1, end 0, length 1
StringIndexOutOfBoundsException: begin 1, end 0, length 1 at java.
ERROR: "Exception in thread "main" java.io.IOException: ObjectIdentifier() -- data isn't an object ID (tag = 48)" while using Public/Private Key Pair Authentication with Snowflake JDBC Driver.
ERROR: "Exception in thread "main" java.io.IOException: ObjectIdentifier() - - data isn't an object ID (tag = 48)" while using Public/Private Key Pair Authentication with Snowflake JDBC Driver.
Creating a Session for Snowpark Java
Creating a Session for Snowpark Java To use Snowpark in your application, you need to create a session. For convenience in writing code, you can also import the names of packages and objects.
Creating a Java UDF handler
When you write a Java UDF, you write Java code for Snowflake to execute as UDF logic. This Java code is the UDF’s handler. You deploy the UDF with CREATE FUNCTION, giving the UDF a name and specifying the Java method as the handler to…
A Simple Example of Using Snowpark Java
A Simple Example of Using Snowpark Java The following example prints the count and names of tables in the current database.