current_user function

Returns the user executing the statement.

Since: Databricks Runtime 10.0

Syntax

current_user()

Arguments

This function takes no arguments.

Returns

A STRING.

The braces are optional.

Examples

> SELECT current_user();
 user1
> SELECT current_user;
 user1