snowflake.snowpark.Session.SessionBuilder.configs

SessionBuilder.configs(options: Dict[str, Union[int, str]]) → SessionBuilder

Adds the specified dict of connection parameters to the SessionBuilder configuration.

Parameters:

options – A dictionary mapping connection parameter names to their values. For supported parameters and their descriptions, see the Snowflake Connector for Python connect parameters.

Returns:

This SessionBuilder instance. Call create() to establish the session.

Note

Values in options overwrite previously configured values with the same keys. Previously configured parameters not present in options are retained.

Example::
>>> # Use a connection named "myconnection" defined in connections.toml.
>>> connection_parameters = {
...     "connection_name": "myconnection",
...     "warehouse": "MY_WAREHOUSE",
... }
>>> session = Session.builder.configs(connection_parameters).create()  

For authentication options and additional examples, see Creating a Session for Snowpark Python.