Closed grootrm closed 10 months ago
The keys in OPTIONS
shouldn't be capitalized as they correspond to the parameters of snowflake.connector.connect(). Please try with 'authenticator'
and 'role'
.
Oh wow thanks Tim, that solved it! You da man.
:+1:
I am unable to get the externalbrowser window to pop up indicating successful connection. When I runserver, I get DatabaseError: Failed to connect to DB:.privatelink.snowflakecomputing.com:443. Incorrect username or password was specified.
In settings.py (using dummy variables here, real ones are used in production):
Also tried placing 'AUTHENTICATOR': 'externalbrowser' as its own key in default, outside of OPTIONS.
relevant package versions:
system: Windows 10 Enterprise version 21H2 Intel(R) Core(TM) i5-8350U CPU @ 1.70 GHz
As additional background I am able to successfully connect to snowflake using these same exact credentials when using snowflake-connector-python package only, outside of django, just running regular queries, and can also connect and update tables using the same exact credentials in Node.js. But I can't get it to work with django-snowflake. When I runserver, the expected web browser window never appears, it just indicates incorrect username or password, but I know they're correct.
My snowflake DB admin has access to what I am doing and he has advised me that he is seeing failed connections with snowflake-connector-python 3.6.0 and that it appears as though externalbrowser is not being used, that it may be attempting to access using my username and password only, which we cannot do as we're behind company enterprise agreement with snowflake and MUST use externalbrowser authentication. Since I never see the browser window appear in django, just the incorrect username or password error in the terminal, perhaps I am doing something wrong to prevent django-snowflake from recognizing the authenticator key. But I have tried all combinations, including the exact pattern as in the quickstart docs, and still no luck.
Has anyone encountered this and could anyone advise what I am doing wrong?
Thanks in advance.