An external table schema defines the columns and data types of the data stored in an external stage. All external tables include the following columns by default:
VALUE: A VARIANT type column that represents a single row in the external file.
METADATA$FILENAME: A pseudocolumn that identifies the name of each staged data file included in the external table, including its path in the stage.
METADATA$FILE_ROW_NUMBER: A pseudocolumn that shows the row number for each record in a staged data file.
You can also create additional virtual columns as expressions using the VALUE column and/or the pseudocolumns. However, the following columns are not valid for external tables and cannot be included in the schema:
METADATASROW_ID: This column is only available for internal tables and shows the unique identifier for each row in the table.
METADATASISUPDATE: This column is only available for internal tables and shows whether the row was inserted or updated by a merge operation.
METADATASEXTERNAL TABLE PARTITION: This column is not a valid column name and does not exist in Snowflake.
Introduction to External Tables, CREATE EXTERNAL TABLE
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit