snowflake.snowpark.secrets.get_username_password

snowflake.snowpark.secrets.get_username_password(secret_name: str) UsernamePassword[source]

Get a username and password secret from Snowflake. .. note:: Require a Snowflake environment with username/password secrets configured

Returns:

An object with attributes username and password.

Return type:

UsernamePassword

Raises:
  • NotImplementedError – If running outside Snowflake server or SPCS environment.

  • ValueError – If the secret does not exist or is not authorized (SPCS only).