> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sdf.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Context Functions

## `all_user_names`

*Supported Signatures*

```sql theme={null}
function all_user_names() returns array
```

[🔗 Official Documentation](https://docs.snowflake.com/en/sql-reference/functions/all_user_names)

## `current_account`

*Supported Signatures*

```sql theme={null}
function current_account() returns string
```

[🔗 Official Documentation](https://docs.snowflake.com/en/sql-reference/functions/current_account)

## `current_account_name`

*Supported Signatures*

```sql theme={null}
function current_account_name() returns string
```

[🔗 Official Documentation](https://docs.snowflake.com/en/sql-reference/functions/current_account_name)

## `current_available_roles`

*Supported Signatures*

```sql theme={null}
function current_available_roles() returns string
```

[🔗 Official Documentation](https://docs.snowflake.com/en/sql-reference/functions/current_available_roles)

## `current_client`

Returns the current client version.
*Supported Signatures*

```sql theme={null}
function current_client() returns varchar
```

[🔗 Official Documentation](https://docs.snowflake.com/en/sql-reference/functions/current_client)

## `current_database`

Returns the current database.
*Supported Signatures*

```sql theme={null}
function current_database() returns varchar
```

[🔗 Official Documentation](https://docs.snowflake.com/en/sql-reference/functions/current_database)

## `current_date`

Returns the current date.
*Supported Signatures*

```sql theme={null}
function current_date() returns date
```

[🔗 Official Documentation](https://docs.snowflake.com/en/sql-reference/functions/current_date)

## `current_ip_address`

Returns the Client Internet Protocol address (IP address) of the current request.
*Supported Signatures*

```sql theme={null}
function current_ip_address() returns varchar
```

[🔗 Official Documentation](https://docs.snowflake.com/en/sql-reference/functions/current_ip_address)

## `current_organization_name`

Returns the name of the organization the current account belongs to.
*Supported Signatures*

```sql theme={null}
function current_organization_name() returns varchar
```

[🔗 Official Documentation](https://docs.snowflake.com/en/sql-reference/functions/current_organization_name)

## `current_region`

Returns the current region name.
*Supported Signatures*

```sql theme={null}
function current_region() returns varchar
```

[🔗 Official Documentation](https://docs.snowflake.com/en/sql-reference/functions/current_region)

## `current_role`

Returns the currently active role name.
*Supported Signatures*

```sql theme={null}
function current_role() returns varchar
```

[🔗 Official Documentation](https://docs.snowflake.com/en/sql-reference/functions/current_role)

## `current_role_type`

Returns if the current role is of type account or database
*Supported Signatures*

```sql theme={null}
function current_role_type() returns varchar
```

[🔗 Official Documentation](https://docs.snowflake.com/en/sql-reference/functions/current_role_type)

## `current_schema`

Returns the current schema.
*Supported Signatures*

```sql theme={null}
function current_schema() returns varchar
```

[🔗 Official Documentation](https://docs.snowflake.com/en/sql-reference/functions/current_schema)

## `current_schemas`

Returns active search path schemas
*Supported Signatures*

```sql theme={null}
function current_schemas() returns varchar
```

[🔗 Official Documentation](https://docs.snowflake.com/en/sql-reference/functions/current_schemas)

## `current_secondary_roles`

Returns the currently active secondary roles' names.
*Supported Signatures*

```sql theme={null}
function current_secondary_roles() returns varchar
```

[🔗 Official Documentation](https://docs.snowflake.com/en/sql-reference/functions/current_secondary_roles)

## `current_session`

Returns the current session.
*Supported Signatures*

```sql theme={null}
function current_session() returns varchar
```

[🔗 Official Documentation](https://docs.snowflake.com/en/sql-reference/functions/current_session)

## `current_statement`

Returns the text of the currently executing statement.
*Supported Signatures*

```sql theme={null}
function current_statement() returns varchar
```

[🔗 Official Documentation](https://docs.snowflake.com/en/sql-reference/functions/current_statement)

## `current_time`

Returns the current time.
*Supported Signatures*

```sql theme={null}
function current_time() returns time
function current_time(decimal(38, 0)) returns time
```

[🔗 Official Documentation](https://docs.snowflake.com/en/sql-reference/functions/current_time)

## `current_timestamp`

Returns the current timestamp.
*Supported Signatures*

```sql theme={null}
function current_timestamp() returns timestamp
function current_timestamp(decimal(38, 0)) returns timestamp
```

[🔗 Official Documentation](https://docs.snowflake.com/en/sql-reference/functions/current_timestamp)

## `current_transaction`

Returns the transaction id of an open transaction in the current session or scope.
*Supported Signatures*

```sql theme={null}
function current_transaction() returns decimal(38, 0)
```

[🔗 Official Documentation](https://docs.snowflake.com/en/sql-reference/functions/current_transaction)

## `current_user`

Returns the current user name.
*Supported Signatures*

```sql theme={null}
function current_user() returns varchar
```

[🔗 Official Documentation](https://docs.snowflake.com/en/sql-reference/functions/current_user)

## `current_version`

Returns the current software version (major.minor.patch).
*Supported Signatures*

```sql theme={null}
function current_version() returns varchar
```

[🔗 Official Documentation](https://docs.snowflake.com/en/sql-reference/functions/current_version)

## `current_warehouse`

Returns the warehouse currently in use.
*Supported Signatures*

```sql theme={null}
function current_warehouse() returns varchar
```

[🔗 Official Documentation](https://docs.snowflake.com/en/sql-reference/functions/current_warehouse)

## `getdate`

Returns the current timestamp
*Supported Signatures*

```sql theme={null}
function getdate() returns timestamp
```

[🔗 Official Documentation](https://docs.snowflake.com/en/sql-reference/functions/getdate)

## `getvariable`

*Supported Signatures*

```sql theme={null}
function getvariable(string) returns string
```

[🔗 Official Documentation](https://docs.snowflake.com/en/sql-reference/functions/getvariable)

## `invoker_role`

Returns the invoker role
*Supported Signatures*

```sql theme={null}
function invoker_role() returns varchar
```

[🔗 Official Documentation](https://docs.snowflake.com/en/sql-reference/functions/invoker_role)

## `invoker_share`

Returns the invoker role
*Supported Signatures*

```sql theme={null}
function invoker_share() returns varchar
```

[🔗 Official Documentation](https://docs.snowflake.com/en/sql-reference/functions/invoker_share)

## `is_database_role_in_session`

Return true if the db role is in current role hierarchy
*Supported Signatures*

```sql theme={null}
function is_database_role_in_session(varchar) returns boolean
```

[🔗 Official Documentation](https://docs.snowflake.com/en/sql-reference/functions/is_database_role_in_session)

## `is_granted_to_invoker_role`

Returns true if the arg is in invoker\_role's hierarchy
*Supported Signatures*

```sql theme={null}
function is_granted_to_invoker_role(varchar) returns boolean
```

[🔗 Official Documentation](https://docs.snowflake.com/en/sql-reference/functions/is_granted_to_invoker_role)

## `is_role_in_session`

Return true if in current hierarchy
*Supported Signatures*

```sql theme={null}
function is_role_in_session(varchar) returns boolean
```

[🔗 Official Documentation](https://docs.snowflake.com/en/sql-reference/functions/is_role_in_session)

## `last_query_id`

Returns the id of the last executed statement in the current session.
*Supported Signatures*

```sql theme={null}
function last_query_id() returns varchar
function last_query_id(decimal(38, 0)) returns varchar
```

[🔗 Official Documentation](https://docs.snowflake.com/en/sql-reference/functions/last_query_id)

## `last_transaction`

Returns the transaction id of the last committed or rolled back transaction in the current session.
*Supported Signatures*

```sql theme={null}
function last_transaction() returns decimal(38, 0)
```

[🔗 Official Documentation](https://docs.snowflake.com/en/sql-reference/functions/last_transaction)

## `localtime`

Returns the current time.
*Supported Signatures*

```sql theme={null}
function localtime() returns time
function localtime(decimal(38, 0)) returns time
```

[🔗 Official Documentation](https://docs.snowflake.com/en/sql-reference/functions/localtime)

## `localtimestamp`

Returns the current timestamp.
*Supported Signatures*

```sql theme={null}
function localtimestamp() returns timestamp
function localtimestamp(decimal(38, 0)) returns timestamp
```

[🔗 Official Documentation](https://docs.snowflake.com/en/sql-reference/functions/localtimestamp)

## `sysdate`

Returns the current timestamp in the UTC time zone
*Supported Signatures*

```sql theme={null}
function sysdate() returns timestamp
```

[🔗 Official Documentation](https://docs.snowflake.com/en/sql-reference/functions/sysdate)

## `systimestamp`

Returns the current timestamp
*Supported Signatures*

```sql theme={null}
function systimestamp() returns timestamp
```

[🔗 Official Documentation](https://docs.snowflake.com/en/sql-reference/functions/systimestamp)
