Categories:

System functions (Information)

SYSTEM$GET_ALL_DEFAULT_COLUMNS_OVERRIDES

Returns the list of columns that were set by previous calls to SYSTEM$SET_DEFAULT_COLUMNS_OVERRIDE_FOR_SHOW_COMMAND and SYSTEM$SET_DEFAULT_COLUMNS_OVERRIDE_FOR_SYSTEM_OBJECT.

For more information, see Handling new columns in SHOW command output, Snowflake views, and table functions.

See also:

SYSTEM$SET_DEFAULT_COLUMNS_OVERRIDE_FOR_SHOW_COMMAND , SYSTEM$GET_DEFAULT_COLUMNS_OVERRIDE_FOR_SHOW_COMMAND , SYSTEM$UNSET_DEFAULT_COLUMNS_OVERRIDE_FOR_SHOW_COMMAND , SYSTEM$SET_DEFAULT_COLUMNS_OVERRIDE_FOR_SYSTEM_OBJECT , SYSTEM$GET_DEFAULT_COLUMNS_OVERRIDE_FOR_SYSTEM_OBJECT , SYSTEM$UNSET_DEFAULT_COLUMNS_OVERRIDE_FOR_SYSTEM_OBJECT

Syntax

SYSTEM$GET_ALL_DEFAULT_COLUMNS_OVERRIDES()

Arguments

None.

Returns

Returns a VARCHAR value (a string) in JSON format. The string is a JSON array that contains an object for each SHOW command, Snowflake view, and built-in table function that has an overridden list of columns.

If the object represents the overridden list of default columns for a SHOW command, the object contains the following name/value pairs:

NameDescription
isShowCommandIndicates if the object represents the list of columns for a SHOW command. In this case, the value is true.
showCommandTypeType of the object for the SHOW command. For example, for SHOW NOTIFICATION INTEGRATIONS, the value is "NOTIFICATION INTEGRATIONS".
serializedDefaultColumnsComma-separated list of columns specified in a previous SYSTEM$SET_DEFAULT_COLUMNS_OVERRIDE_FOR_SHOW_COMMAND call. The column names are in uppercase.

If the object represents the overridden list of default columns for a Snowflake view or built-in table function, the object contains the following name/value pairs:

NameDescription
domainType of the object. The value is "VIEW" for a Snowflake view or "FUNCTION" for a built-in table function.
isShowCommandIndicates if the object represents the list of columns for a SHOW command. In this case, the value is false.
dbNameName of the database containing the object. For INFORMATION_SCHEMA views and table functions, the value is an empty string ("").
schemaNameName of the schema containing the object.
objectNameName of the view or table function.
serializedDefaultColumnsComma-separated list of columns specified in a previous SYSTEM$SET_DEFAULT_COLUMNS_OVERRIDE_FOR_SYSTEM_OBJECT call. The column names are in uppercase.

Access control requirements

Only account administrators (users who have been granted the ACCOUNTADMIN role) can call this function.

Examples

The following example returns the list of columns specified by previous calls to SYSTEM$SET_DEFAULT_COLUMNS_OVERRIDE_FOR_SHOW_COMMAND and SYSTEM$SET_DEFAULT_COLUMNS_OVERRIDE_FOR_SYSTEM_OBJECT:

SELECT SYSTEM$GET_ALL_DEFAULT_COLUMNS_OVERRIDES();
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| SYSTEM$GET_ALL_DEFAULT_COLUMNS_OVERRIDES()                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [{"domain":"VIEW","isShowCommand":false,"dbName":"","schemaName":"INFORMATION_SCHEMA","objectName":"DATABASES","serializedDefaultColumns":"DATABASE_NAME,DATABASE_OWNER,IS_TRANSIENT,COMMENT,CREATED,LAST_ALTERED,RETENTION_TIME,TYPE,OWNER_ROLE_TYPE"},{"domain":"VIEW","isShowCommand":false,"dbName":"SNOWFLAKE","schemaName":"ACCOUNT_USAGE","objectName":"DATABASES","serializedDefaultColumns":"DATABASE_ID,DATABASE_NAME,DATABASE_OWNER,IS_TRANSIENT,COMMENT,CREATED,LAST_ALTERED,DELETED,RETENTION_TIME,RESOURCE_GROUP,TYPE,OWNER_ROLE_TYPE,OBJECT_VISIBILITY"},{"isShowCommand":true,"showCommandType":"NOTIFICATION INTEGRATIONS","serializedDefaultColumns":"name,type,category,enabled,comment,created_on"}] |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+