0
votes

Snowflake Python Connector only works for a user created with CREATE USER command, doesn't seem to work for managed reader accounts.

On WebUI:

CREATE MANAGED ACCOUNT python_reader_acct ADMIN_NAME = reader_1, ADMIN_PASSWORD = 'reader_pwd', TYPE = READER;

On Python:

import snowflake.connector
ctx = snowflake.connector.connect(
    user='reader_1',
    password='reader_pwd',
    account='xxxx.ca-central-1.aws',
    <....>)

will give credential error: snowflake.connector.errors.DatabaseError: 250001 (08001): Failed to connect to DB: *****.ca-central-1.aws.snowflakecomputing.com:443. Incorrect username or password was specified.

Snowflake's documentation only mentions creating and dropping reader accounts, not much in the way of granting permissions to readers or connecting as readers.

1

1 Answers

0
votes

Snowflake Reader Accounts are just like regular accounts after they are created, except for the limitations on executing DML statements as described in the documentation. So, once you've created the reader account, you should be able to log into it with your user/password. However, you should've gotten a license-plate type of account name. In your example above, is xxxx the reader account or the account that you ran the CREATE MANAGED ACCOUNT from?

Also, can you clarify whether you were able to log into the reader account via the Snowflake UI? Shouldn't be any different from Python, but might help you diagnose your issue.