3

I need to connect from google. Example from snowflake is

ctx = snowflake.connector.connect(
    user="<username>",
    host="<hostname>",
    account="<account_identifier>",
    authenticator="oauth",
    token="<oauth_access_token>",
    warehouse="test_warehouse",
    database="test_db",
    schema="test_schema")

but how can i get <oauth_access_token> value? Please help

1
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. Commented Oct 22, 2021 at 6:19

1 Answer 1

5

You need to generate the OAuth Token based on the OAuth security that you have set up. Whether it is a Snowflake OAuth or External OAuth is entirely based on your technical and business requirement. Details for it are here: https://docs.snowflake.com/en/user-guide/oauth-intro.html

There are some great KB's as well which gives exact set of steps for setting it up:

https://community.snowflake.com/s/article/Create-External-OAuth-Token-Using-Azure-AD-For-The-OAuth-Client-Itself

https://community.snowflake.com/s/article/External-oAuth-Token-Generation-using-Azure-AD

https://community.snowflake.com/s/article/How-To-Create-External-Oauth-Token-Using-Okta-For-The-Client-Itself-Service-Flow

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.