- Categories:
Context functions (General)
SYS_ CONTEXT (SNOWFLAKE$ORGANIZATION namespace)¶
Returns information about the current organization.
You can call this function in any account in the organization. In any other context, the function returns NULL.
- See also:
SYS_CONTEXT , SYS_CONTEXT (SNOWFLAKE$APPLICATION namespace) , SYS_CONTEXT (SNOWFLAKE$ENVIRONMENT namespace) , SYS_CONTEXT (SNOWFLAKE$ORGANIZATION_SESSION namespace) , SYS_CONTEXT (SNOWFLAKE$SESSION namespace) , IS_GROUP_ACTIVATED (SYS_CONTEXT function) , IS_GROUP_IMPORTED (SYS_CONTEXT function) , IS_USER_IMPORTED (SYS_CONTEXT function)
Syntax¶
Syntax for calling functions:
Arguments¶
'SNOWFLAKE$ORGANIZATION'Specifies that you want to retrieve a property or call a function to return context information about the current organization.
Returns¶
The function returns a VARCHAR value or NULL:
- The return value depends on the function that you are calling.
- If you call SYS_CONTEXT with the SNOWFLAKE$ORGANIZATION namespace outside of any of the supported contexts, the function returns NULL.
2026_06 behavior change bundle
When the 2026_06 behavior change bundle is enabled in your account, the IS_USER_IMPORTED, IS_GROUP_IMPORTED, and IS_GROUP_ACTIVATED functions
return BOOLEAN.
Existing casts, such as ::BOOLEAN or ::NUMBER, continue to work unchanged.
For the return type of every property and function by namespace, see SYS_CONTEXT return types.
Usage notes¶
-
If you are specifying the function call in a double-quoted string in a shell, escape the
$character with a backslash (\) so that$ORGANIZATIONis not interpreted as a shell variable.For example, if you are using Snowflake CLI and you are specifying the SQL statement as a command-line argument in double quotes:
Examples¶
See the following topics: