pyspark.sql.functions.current_user

pyspark.sql.functions.current_user() → pyspark.sql.column.Column[source]

Returns the current database.

New in version 3.5.0.

Examples

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