CREATE EXTERNAL TABLE

DESCRIPTION

Snowflake supports CREATE EXTERNAL TABLE but with a more limited number of features, but as data storage is generally not a major concern. It is often feasible to convert external tables to normal Snowflake tables. However, this process requires additional effort because data stored in external BigQuery tables must be transferred to the Snowflake database.

Grammar Syntax

CREATE [ OR REPLACE ] EXTERNAL TABLE [ IF NOT EXISTS ] table_name
[(
  column_name column_schema,
  ...
)]
[WITH CONNECTION connection_name]
[WITH PARTITION COLUMNS
  [(
      partition_column_name partition_column_type,
      ...
  )]
]
OPTIONS (
  external_table_option_list,
  ...
);

Click here to go to the specification for this syntax.

Basic

Sample InputCode

Snowflake OutputCode

WITH CONNECTION

Sample InputCode

Snowflake OutputCode

PARTITION COLUMNS

WITH COLUMNS NAMES

Sample InputCode

Snowflake OutputCode

WITHOUT COLUMNS NAMES

Sample InputCode

Snowflake OutputCode

  1. MSC-BQ0015: The resulting table has no columns.

  2. MSCINF0058: External table translated to regular table.

Last updated

Was this helpful?