Categories:

System functions (System Information)

SYSTEM$GET_HASH_FOR_APPLICATIONยถ

Returns the hash value for a Snowflake Native App or query ID.

Syntaxยถ

SYSTEM$GET_HASH_FOR_APPLICATION( '<app_name>' [ , '<query_id>' ] )
Copy

Argumentsยถ

Required

'app_name'

The name of the app whose hash value you want to return.

Optional:

'query_id'

The query ID whose hash value you want to return.

Returnsยถ

Returns a signed 64-bit hash value. If a query ID is passed as an argument to this function, this function returns the hash value of the query ID. Otherwise, it returns the hash value for the app.

Examplesยถ

The following example returns the hash value for the app โ€˜hello_snowflake_appโ€™:

SELECT SYSTEM$GET_HASH_FOR_APPLICATION('hello_snowflake_app');
Copy
+--------------------------------------------------------+
| SYSTEM$GET_HASH_FOR_APPLICATION('HELLO_SNOWFLAKE_APP') |
|--------------------------------------------------------|
| a1b2c3d4e5fg+1234567890+1234
+--------------------------------------------------------+

The following example returns the hash value for a query id associated with the app โ€˜hello_snowflake_appโ€™:

SELECT SYSTEM$GET_HASH_FOR_APPLICATION('hello_snowflake_app', 'abcd1234-12345-WXYZ-0000-0987654321');
Copy
+------------------------------------------------------------------------------------------------+
| SYSTEM$GET_HASH_FOR_APPLICATION('HELLO_SNOWFLAKE_APP', '<app_id>') |
|------------------------------------------------------------------------------------------------|
| a1b2c3d4e5fg+1234567890+1234                                                                   |
+------------------------------------------------------------------------------------------------+