Security functions
Stay organized with collections
Save and categorize content based on your preferences.
GoogleSQL for BigQuery supports the following security functions.
Function list
| Name | Summary |
|---|---|
SESSION_USER
|
Get the email address or principal identifier of the user that's running the query. |
SESSION_USER
SESSION_USER()
Description
For first-party users, returns the email address of the user that's running the query. For third-party users, returns the principal identifier of the user that's running the query. For more information about identities, see Principals.
Return Data Type
STRING
Example
SELECTSESSION_USER()asuser;
/*----------------------+
| user |
+----------------------+
| jdoe@example.com |
+----------------------*/