GENERATE_COLUMN_DESCRIPTION
functionsupportedData loading & unloadingGenerates a list of columns from a set of staged files that contain semi-structured data using the INFER_SCHEMA function output. The output from this function can be used as input when manually creating a table, external table, Apache Iceberg™ table, or view (using the appropriate CREATE <object> command) based on the column definitions of the staged files. Alternatively, the CREATE TABLE or CREATE ICEBERG TABLE command with the USING TEMPLATE clause can be used to create a new table with the column definitions derived from the same INFER_SCHEMA function output.
Syntax
GENERATE_COLUMN_DESCRIPTION( <expr> , '<string>' )
Parameters
| Name | Required | Description |
|---|---|---|
expr | required | Output of the INFER_SCHEMA function formatted as an array. |
'string' | required | Type of object that could be created from the column list. The appropriate formatting for this type is applied to the output. Possible values are table, external_table, or view. |
Returns
The function returns the list of columns in a set of staged files, which can be used as input when creating an object of the type identified in the second argument.