Source
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. (Note that this is not a complete list of the APIs that correspond to SQL commands.)…
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.
Reading files with a Java stored procedure
You can read the contents of a file with handler code. The file must be on a Snowflake stage that’s available to your handler. For example, you might want to read a file to process unstructured data in the handler.
A Simple Example of Using Snowpark Java
The following example prints the count and names of tables in the current database. Replace the <placeholders> with values that you use to connect 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 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.
Python and Java support for serverless tasks
Serverless tasks can invoke the following object types and functions: user - defined functions (UDFs) and stored procedures written in Python, Java, and Scala.
Logging messages in Java
You can log messages from a function or procedure handler written in Java by using the SLF4J API. When you’ve set up an event table to store log entries, Snowflake stores log entries generated by your handler code in the table.
JDBC connections requiring a proxy generate 'Encountered exception (connect timed out) during upload' exceptions for PUT operations using downscoped tokens
JDBC connections requiring a proxy generate 'Encountered exception (connect timed out) during upload'…
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];…