You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sedona.apache.org by ji...@apache.org on 2026/10/13 06:36:46 UTC
(sedona) branch master updated: [CI] Migrate Snowflake stage uploads to the JDBC 4 API (#3451)
This is an automated email from the ASF dual-hosted git repository.
jiayuasu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sedona.git
The following commit(s) were added to refs/heads/master by this push:
new 58bc3b09db7 [CI] Migrate Snowflake stage uploads to the JDBC 4 API (#3451)
58bc3b09db7 is described below
commit 58bc3b09db756a25bc68aa9607fd406e9dc32f45
Author: Jia Yu <ji...@apache.org>
AuthorDate: Mon Oct 12 23:36:40 2026 -0700
[CI] Migrate Snowflake stage uploads to the JDBC 4 API (#3451)
---
.../java/org/apache/sedona/snowflake/snowsql/SnowClient.java | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/snowflake-tester/src/test/java/org/apache/sedona/snowflake/snowsql/SnowClient.java b/snowflake-tester/src/test/java/org/apache/sedona/snowflake/snowsql/SnowClient.java
index a8b22f33d60..67d756cd0fd 100644
--- a/snowflake-tester/src/test/java/org/apache/sedona/snowflake/snowsql/SnowClient.java
+++ b/snowflake-tester/src/test/java/org/apache/sedona/snowflake/snowsql/SnowClient.java
@@ -27,7 +27,8 @@ import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Objects;
import java.util.Properties;
-import net.snowflake.client.jdbc.SnowflakeConnection;
+import net.snowflake.client.api.connection.SnowflakeConnection;
+import net.snowflake.client.api.connection.UploadStreamConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -80,7 +81,11 @@ public class SnowClient {
logger.info(String.format("upload file %s to stage %s", path, stage));
FileInputStream fileInputStream = new FileInputStream(jarFile);
conn.unwrap(SnowflakeConnection.class)
- .uploadStream(stage, "", fileInputStream, fileName, false);
+ .uploadStream(
+ stage,
+ fileName,
+ fileInputStream,
+ UploadStreamConfig.builder().setDestPrefix("").setCompressData(false).build());
logger.info("upload finished");
} catch (FileNotFoundException | SQLException e) {
throw new RuntimeException(e);