Skip to content

Commit

Permalink
update instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-cnivera committed Jul 29, 2024
1 parent f204bd0 commit a562b29
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export SNOWFLAKE_PASSWORD="<your-snowflake-password>"
```bash
export SNOWFLAKE_AUTHENTICATOR="username_password_mfa"
export SNOWFLAKE_PASSWORD="<your-snowflake-password>"
export SNOWFLAKE_MFA_PASSCODE="<your-snowflake-mfa-passcode>" # if your authenticator app says "123 456", enter "123456" (no spaces)
```

3. Single Sign-On (SSO) with Okta
Expand Down
4 changes: 3 additions & 1 deletion semantic_model_generator/snowflake_utils/env_vars.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
SNOWFLAKE_HOST = os.getenv("SNOWFLAKE_HOST")
SNOWFLAKE_AUTHENTICATOR = os.getenv("SNOWFLAKE_AUTHENTICATOR")
SNOWFLAKE_ACCOUNT_LOCATOR = os.getenv("SNOWFLAKE_ACCOUNT_LOCATOR")
SNOWFLAKE_PASSCODE = os.getenv("SNOWFLAKE_PASSCODE") # optional, only required for MFA
SNOWFLAKE_MFA_PASSCODE = os.getenv(
"SNOWFLAKE_MFA_PASSCODE"
) # optional, only required for MFA


def assert_required_env_vars() -> list[str]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ def _get_authenticator(self) -> Optional[str]:
return auth

def _get_mfa_passcode(self) -> Optional[str]:
passcode = env_vars.SNOWFLAKE_PASSCODE
passcode = env_vars.SNOWFLAKE_MFA_PASSCODE
return passcode

@contextmanager
Expand Down

0 comments on commit a562b29

Please sign in to comment.