Skip to content

Update Snowflake JDBC driver to 4.3.4 - #68

Open
vishwasvaidya-cloudsufi wants to merge 1 commit into
data-integrations:developfrom
cloudsufi:change-snowflake-version-4.3.4
Open

vishwasvaidya-cloudsufi wants to merge 1 commit into
data-integrations:developfrom
cloudsufi:change-snowflake-version-4.3.4

Conversation

@vishwasvaidya-cloudsufi

Copy link
Copy Markdown

Summary

Bumps snowflake-jdbc.version from 4.0.2 to 4.3.4.

Driver 4.0.2 fails to create the S3 client when the stage endpoint has no URI scheme. Snowflake Government accounts return their endpoint this way, so every read (downloadStream) fails on
those accounts with:
java.lang.NullPointerException: The URI scheme of endpointOverride must not be null.
Snowflake fixed this upstream in snowflakedb/snowflake-jdbc#2572 (SNOW-3344317), first released in 4.2.0. In 4.3.4, an endpoint without a scheme gets https:// added before the client is built.
The plugin code needs no changes: the driver APIs it uses (SnowflakeConnection,
UploadStreamConfig, DownloadStreamConfig, SnowflakeBasicDataSource) are the same in 4.3.4.The driver is still built for Java 8, and the CDAP parent range is unchanged, so CDAP 6.10 and 6.11 stay supported.

Changes

  • pom.xml: snowflake-jdbc.version 4.0.2 → 4.3.4
  • New SnowflakeS3StageEndpointTest: builds the S3 client the same way downloadStream does (StageInfo → StorageClientFactory.createClient) and checks the endpoint it ends up with:
    • endpoint without a scheme → https://<endpoint>
    • https:// endpoint → unchanged
    • no endpoint → no override

Testing

Driver SnowflakeS3StageEndpointTest
4.0.2 scheme-less case fails with the NPE above; other 2 pass
4.3.4 3/3 pass

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request upgrades the snowflake-jdbc dependency version from 4.0.2 to 4.3.4 in pom.xml. It also introduces a new unit test, SnowflakeS3StageEndpointTest.java, to verify that the S3 client correctly handles and normalizes schemeless stage endpoints returned by Snowflake (such as those from government accounts). I have no feedback to provide as there are no review comments to evaluate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant