snowflake.snowpark.functions.current_database¶
- snowflake.snowpark.functions.current_database() Column [source] (https://github.com/snowflakedb/snowpark-python/blob/v1.16.0/src/snowflake/snowpark/functions.py#L391-L399)¶
Returns the name of the database in use for the current session.
Example
>>> # Return result is tied to session, so we only test if the result exists >>> result = session.create_dataframe([1]).select(current_database()).collect() >>> assert result[0]['CURRENT_DATABASE()'] is not None