I am trying to connect snowflake using python connector but i am facing problem while connecting to a specific role. even i have access to that role at snowflake web application but i am not able to connect with that same role using python connector. i am only able to connect with PUBLIC role.
I am using following script:
conn = snowflake.connector.connect(
user=USER,
password=PASSWORD,
role=ROLE,
account=ACCOUNT,
warehouse=WAREHOUSE,
database=DATABASE,
schema=SCHEMA,
autocommit=False
)
I am getting following error:
DatabaseError: 250001 (08001): Failed to connect to DB: account_name.east-us-2.azure.snowflakecomputing.com:443. Role 'ANALYST_ROLE' specified in the connect string does not exist or not authorized. Contact your local system administrator, or attempt to login with another role, e.g. PUBLIC.