pyspark.sql.functions.current_user#

pyspark.sql.functions.current_user()[source]#

Returns the current database.

New in version 3.5.0.

Examples

>>> spark.range(1).select(current_user()).show() 
+--------------+
|current_user()|
+--------------+
| ruifeng.zheng|
+--------------+