Source
Exception 'java.net.UnknownHostException' when connecting to scoped stage file URLs within Snowpark Java functions
ISSUE: When using dynamic file access URLs such as via function BUILD_SCOPED_FILE_URL(@stage, path) in Snowpark Java functions (UDFs, SPs, etc.), attempting to directly connect to the passed scoped file URL in the following manner fails…
Analyzing queries and troubleshooting with Snowpark Java
To inspect the evaluation plan of a DataFrame, call the explain method of the DataFrame. This prints the SQL statements used to evaluate the DataFrame. If there is only one SQL statement, the method also prints the logical plan for the…
JDBC driver with -Dhttp.nonProxyHosts=* set throws java.lang.StringIndexOutOfBoundsException: begin 1, end 0, length 1
ISSUE: When using the JDBC driver's diagnostics feature (i.e., ENABLE_DIAGNOSTICS=TRUE)1, if the - Dhttp.
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 UDF handler examples
This code returns the VARCHAR passed to it. This function is declared with the optional CALLED ON NULL INPUT clause to indicate that the function is called even if the value of the input is NULL.
Java UDF is not keeping the timezone offset information when using Timestamp data type
ISSUE: When Timestamp data is being used in a Java UDF, the timezone information (offset) will be dropped, as can be seen from the following example:Example: CREATE OR REPLACE FUNCTION "JAVA_REFLECT_TIMESTAMP_TZ"("I" TIMESTAMP_TZ) RETURNS…
Error during ETL operations: JAVA PLUGIN_1762 [ERROR] java.lang.OutOfMemoryError: GC overhead limit exceeded
Error during ETL operations: JAVA PLUGIN_1762 [ERROR] 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…
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…