Categories:

Context functions (General)

IS_CONFIGURATION_SET(SYS_CONTEXT 函数)

Returns the VARCHAR value 'TRUE' if the specified configuration has a value set, that is, the configuration’s status is DONE. Returns FALSE if the configuration does not have a value set, that is, the configuration’s status is PENDING.

See also:

SYS_CONTEXT (SNOWFLAKE$APPLICATION namespace)

语法

SYS_CONTEXT(
  'SNOWFLAKE$APPLICATION' ,
  'IS_CONFIGURATION_SET' ,
  '<config_name>' ,
)

实参

'SNOWFLAKE$APPLICATION'

指定要调用函数以返回有关调用该函数的应用程序的上下文信息。

'IS_CONFIGURATION_SET'

调用 IS_CONFIGURATION_SET 函数。

'config_name'

指定要检查的配置的名称。

返回

该函数返回以下 VARCHAR 值之一:

  • 'TRUE' if the configuration has a value set.
  • 'FALSE' if the configuration does not have a value set.

To compare this return value against the BOOLEAN value TRUE or FALSE, cast the return value to BOOLEAN. For example:

SELECT SYS_CONTEXT('SNOWFLAKE$APPLICATION', 'IS_CONFIGURATION_SET', 'my_config_name')::BOOLEAN = TRUE;

使用说明

  • 此函数只能由应用程序使用。