flaky_current: Return current session context

Description Usage Arguments Details Source Examples

View source: R/flaky_current.R

Description

Queries for context variables related to the current Snowflake session. Examples are ROLE, CLIENT, etc.

Usage

1
flaky_current(current_set, con = getOption("flaky.con"))

Arguments

current_set

Optional character vector that contains the base of context variable. When missing all variables are returned.

con

A connection object. Typically generated by [flaky_connect()].

Details

The boilerplate parts of the base name are added by the function. For example '"region"' will become 'CURRENT_REGION()' and '"role"' will become 'CURRENT_ROLE()'.

Source

<https://docs.snowflake.net/manuals/sql-reference/functions-context.html>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
/dontrun{
# See all variables
flaky_current()

# See one variable
flaky_current("warehouse")

# See a few variables
flaky_current(c("role", "schema"))
}

ndiquattro/flaky documentation built on Nov. 23, 2020, 6:26 p.m.