-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SNOW-1674866: Support jdbc driver autoconfiguration in Snwoflake container #1896
Comments
Hi @amergey, I'm trying to understand the exact requirements from your description. The link you provided explains how you can leverage the environment variables Are you asking that once you pass the connection string In both approaches, you'll still need to create a network rule. Other than the account name/hostname, you're still going to need to pass other configurations to the JDBC driver. What extra work do you need to do here to pass that information to the JDBC driver that you wouldn't already need to do for all the other configurations like the username, authentication method, role, etc...? |
Of course similar to what python code is doing in your documentation, java code could read env variables to properly configure jdbc driver (url, and properties), but actually from the documentation, I do not know if it is possible to use internal snowflake host with jdbc driver. Documentation only mention "public address" way of connecting to snowflake, while with python we can do both (public and private network address)
Yes exactly, it could be a great feature to improve connectivity experience from snowflake container service in java
In python if you use public address with SNOWFLAKE_ACCOUNT you are right it is necessary to create network rule, but as explained in documentation if you use env variables SNOWFLAKE_HOST + oauth token, no need for network rule, I guess it should be similar in java
automated configuration can get all of that, from env variables defined by snowflake in container including authentication which is oauth with the given token, all is explained in your documentation (https://docs.snowflake.com/en/developer-guide/snowpark-container-services/additional-considerations-services-jobs).
And for those who need custom configuration, they will not use auto configuration but pass configuration to the driver explicitely as of today |
It looks like this is already possible today: However, given there's an issue reported in #1902 that would be a blocker. We're already looking into #1902. Have you tried the approach outlined in the link I provided? |
The approoach described in #1902 is exactly what I expect here, thanks ! |
What is the current behavior?
The way to configure a jdbc connection from inside a snowpark container service, is to use "public address" of snowflake account jdbc:snowflake://<account_identifier>.snowflakecomputing.com/?<connection_params> which requires to configure External Access Integration
What is the desired behavior?
Beeing able to connect to snowflake from inside with minimal/automated configuration (similarly to jdbc:snowflake:auto)
as described here with python
https://docs.snowflake.com/en/developer-guide/snowpark-container-services/additional-considerations-services-jobs#connecting-to-snowflake
by leveraging SNOWFLAKE_HOST, SNOWFLAKE_ACCOUNT env variables and /snowflake/session/token token
How would this improve
snowflake-jdbc
?Better support for java application deployed as container in snowpark / snowflake native app
References, Other Background
What is your Snowflake account identifier, if any?
The text was updated successfully, but these errors were encountered: