snowflake.snowpark.functions.current_transaction¶
- snowflake.snowpark.functions.current_transaction() Column [source]¶
Returns the current transaction ID for the session, or NULL if no transaction is active.
Example
>>> # Return result is tied to session, so we only test if the result exists >>> result = session.create_dataframe([1]).select(current_transaction()).collect() >>> assert result[0]['CURRENT_TRANSACTION()'] is None or isinstance(result[0]['CURRENT_TRANSACTION()'], str)