snowflake.snowpark.secrets.get_username_password

snowflake.snowpark.secrets.get_username_password(secret_name: str) UsernamePassword[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.44.0/src/snowflake/snowpark/secrets.py#L238-L248)

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).

Language: English