Source
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…
Tabular Java UDFs (UDTFs)
Your Java UDTF handler class processes rows received in the UDTF call and returns a tabular result. The received rows are partitioned, either implicitly by Snowflake or explicitly in the syntax of the function call.
Introduction to Java UDFs
When a user calls a UDF, the user passes UDF’s name and arguments to Snowflake. Snowflake calls the associated handler code (with arguments, if any) to execute the UDF’s logic. The handler method then returns the output to Snowflake,…
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…
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…
Quick reference: Snowpark Java APIs for SQL commands
This topic provides a quick reference of some of the Snowpark APIs that correspond to SQL commands.
Java UDF handler examples
The following statements create and call an in - line Java UDF. 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…
Java UDF limitations
This topic describes the limitations in place for handlers written in Java.
Creating User-Defined Functions (UDFs) for DataFrames in Java
You can call Snowpark APIs to create user - defined functions (UDFs) for lambda expressions in Java, and you can call these UDFs to process the data in your DataFrame. When you use the Snowpark API to create a UDF, the Snowpark library…
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.nio.Buffer class. This was allowed by Java previously, but not…