current_user
Returns the current database.
Syntax
Python
from pyspark.sql import functions as sf
sf.current_user()
Examples
Example 1: Get current user
Python
from pyspark.sql import functions as sf
spark.range(1).select(sf.current_user()).show()
Output
+--------------+
|current_user()|
+--------------+
| ruifeng.zheng|
+--------------+