Skip to content

Latest commit

 

History

History
38 lines (25 loc) · 707 Bytes

security_functions.md

File metadata and controls

38 lines (25 loc) · 707 Bytes

Security functions

ZetaSQL supports the following security functions.

SESSION_USER

SESSION_USER()

Description

For first-party users, returns the email address of the user that is running the query. For third-party users, returns the principal identifier of the user that is running the query. For more information about identities, see Principals.

Return Data Type

STRING

Example

SELECT SESSION_USER() as user;

+----------------------+
| user                 |
+----------------------+
| jdoe@example.com     |
+----------------------+