PIG
PIG

Reputation: 602

Use case of CURRENT_SESSION

What is the use case of current_session. Where are we going to use alphanumeric value current_session

Upvotes: 1

Views: 110

Answers (2)

Sriga
Sriga

Reputation: 1321

Also each worksheet in your snowflake will be independent session. You can work independently without interrupting another session in snowflake.

Upvotes: 0

waldente
waldente

Reputation: 1434

The SESSION_ID from CURRENT_SESSION() appears in QUERY_HISTORY*(), allowing you to associate queries with a particular session.

It also appears in SHOW TRANSACTIONS, and in the Snowflake UI Sessions tab.

And you can use it with SYSTEM$ABORT_SESSION() and SYSTEM$CANCEL_ALL_QUERIES().

And lastly you can use it in your own logging to tie activity to a particular session.

Upvotes: 1

Related Questions