snowflake.snowpark.Session.SessionBuilder.app_nameΒΆ
- SessionBuilder.app_name(app_name: str, format_json: bool = False) SessionBuilder ΒΆ
Adds the app name to the
SessionBuilder
to set in the query_tag after session creation- Parameters:
app_name β The name of the application.
format_json β If set to True, it will add the app name to the session query tag in JSON format, otherwise, it will add it using a key=value format.
- Returns:
A
SessionBuilder
instance.
- Example::
>>> session = Session.builder.app_name("my_app").configs(db_parameters).create() >>> print(session.query_tag) APPNAME=my_app >>> session = Session.builder.app_name("my_app", format_json=True).configs(db_parameters).create() >>> print(session.query_tag) {"APPNAME": "my_app"}