SYSTEM$SET_DEFAULT_COLUMNS_OVERRIDE_FOR_SYSTEM_OBJECT

functionsupportedAccounts, users, sessions, warehouses

docs.snowflake.com ↗

System functions

Controls the columns that should be returned when you select all columns (SELECT *) from the specified Snowflake view (for example, from a specific ACCOUNT_USAGE, ORGANIZATION_USAGE, READER_ACCOUNT_USAGE, or INFORMATION_SCHEMA view) or from the output of a built-in table function in one of these schemas. Note This function does not affect queries that select specific columns from the view or table function output. You can call this function if the introduction of new columns in a Snowflake view or table function introduces a problem with a script or code that selects all columns and depends on a fixed number or order of columns in the results. See Handling new columns in SHOW command output, Snowflake views, and table functions.

Syntax

SYSTEM$SET_DEFAULT_COLUMNS_OVERRIDE_FOR_SYSTEM_OBJECT(
  '<object_type>',
  '<database_name>',
  '<schema_name>',
  '<object_name>',
  '<list_of_columns>'
)

Parameters

NameRequiredDescription
'object_type'requiredType of the object. Specify 'VIEW' for a Snowflake view or 'FUNCTION' for a built-in table function.
'database_name'requiredName of the database that contains the object. For a view, specify 'SNOWFLAKE' or, for an INFORMATION_SCHEMA view, an empty string. For a table function, specify an empty string for an INFORMATION_SCHEMA table function, or 'SNOWFLAKE' for an ACCOUNT_USAGE, ORGANIZATION_USAGE, or READER_ACCOUNT_USAGE table function.
'schema_name'requiredName of the schema that contains the object. For a view, specify the name of a schema in the SNOWFLAKE database or 'INFORMATION_SCHEMA'. For a table function, specify the name of the schema that contains it, such as 'INFORMATION_SCHEMA', 'ACCOUNT_USAGE', 'ORGANIZATION_USAGE', or 'READER_ACCOUNT_USAGE'.
'object_name'requiredName of the object.
list_of_columnsrequiredComma-separated list of columns that should be returned when you select all columns from this view or from the output of this table function. You can specify the column names in uppercase, lowercase, or mixed case. The columns are returned in their default order, regardless of the order in which you list them. To return all columns, specify an empty string or call SYSTEM$UNSET_DEFAULT_COLUMNS_OVERRIDE_FOR_SYSTEM_OBJECT.

Returns

Returns TRUE if the operation was successful.

Usage notes

Access control requirements

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

See also

Referenced by