property Session.query_tag: Optional[str][source]

The query tag for this session.


Returns the query tag. You can use the query tag to find all queries run for this session in the History page of the Snowflake web interface.


Sets the query tag. If the input is None or an empty str, the session’s query_tag will be unset. If the query tag is not set, the default will be the call stack when a DataFrame method that pushes down the SQL query to the Snowflake Database is called. For example, DataFrame.collect(),, DataFrame.create_or_replace_view() and DataFrame.create_or_replace_temp_view() will push down the SQL query.