CURRENT_WAREHOUSE | Snowflake Documentation (original) (raw)

Categories:

Context functions (Session Object)

Returns the name of the warehouse in use for the current session.

To specify a different warehouse for the session, execute the USE WAREHOUSEcommand.

Syntax

Arguments

None.

Examples

Show the current warehouse, database, and schema:

SELECT CURRENT_WAREHOUSE(), CURRENT_DATABASE(), CURRENT_SCHEMA();

Output:

+---------------------+--------------------+------------------+ | CURRENT_WAREHOUSE() | CURRENT_DATABASE() | CURRENT_SCHEMA() | |---------------------+--------------------+------------------| | DEV_WAREHOUSE | TEST_DATABASE | UDF_TEST_SCHEMA | +---------------------+--------------------+------------------+