View column name list
Description
The view's column name list is optional. The names must be unique but do not have to be the same as the column names of the underlying SQL query. (BigQuery SQL Language Reference View column name list)
This syntax is fully supported in Snowflake.
Grammar Syntax
view_column_name_list :=
view_column [OPTIONS(view_column_option_list)] [, ...]
view_column_option_list :=
DESCRIPTION = value
Sample Source Patterns
Input Code:
CREATE VIEW `myproject.mydataset.newview` (
column_1_new_name OPTIONS (DESCRIPTION='Description of the column 1 contents'),
column_2_new_name OPTIONS (DESCRIPTION='Description of the column 2 contents'),
column_3_new_name OPTIONS (DESCRIPTION='Description of the column 3 contents')
)
AS SELECT column_1, column_2, column_3 FROM `myproject.mydataset.mytable`
Output Code:
CREATE VIEW myproject.mydataset.newview
(
column_1_new_name COMMENT 'Description of the column 1 contents',
column_2_new_name COMMENT 'Description of the column 2 contents',
column_3_new_name COMMENT 'Description of the column 3 contents'
)
COMMENT = '{ "origin": "sf_sc", "name": "snowconvert", "version": { "major": 0, "minor": 0, "patch": "0" }, "attributes": { "component": "bigquery", "convertedOn": "03/25/2025", "domain": "test" }}'
AS SELECT column_1, column_2, column_3 FROM
myproject.mydataset.mytable
Known Issues
There are no known Issues.
Related EWIs
There are no related EWIs.
Last updated