session_user
function
Applies to: Databricks SQL Databricks Runtime 14.1 and above
Returns the user connected to Azure Databricks.
Note
The SQL standard differentiates between CURRENT_USER
and SESSION_USER
.
In Databricks SQL and Databricks Runtime 14.1 and above you should use SESSION_USER
instead of CURRENT_USER
or USER
.
Syntax
session_user()
Arguments
This function takes no arguments.
Returns
A STRING
.
The braces are optional.
Examples
> SELECT session_user();
user1
> SELECT session_user;
user1
Related functions
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for