MSCEWI2076

The use of foreign tables is not supported in Snowflake.

This is a deprecated version of the SnowConvert documentation, please visit the official site HERE.

Severity

Medium

Description

Foreign tables enable access to data in external object storage, such as semi-structured and unstructured data in Amazon S3, Azure Blob storage, and Google Cloud Storage. This syntax is not supported in Snowflake. However, there are other alternatives in Snowflake that can be used instead, such as external tables, iceberg tables, and standard tables.

Example code

Input code:

SELECT cust_id, income, age FROM 
FOREIGN TABLE (SELECT cust_id, income, age FROM twm_customer)@hadoop1 T1;

Output code:

SELECT
cust_id,
income,
age FROM
-- ** MSC-ERROR - MSCEWI2076 - THE USE OF FOREIGN TABLES IS NOT SUPPORTED IN SNOWFLAKE. **
-- FOREIGN TABLE (SELECT cust_id, income, age FROM twm_customer)@hadoop1 T1
                                                                         ;

Recommendations

  • Instead of external tables in Teradata, you can use Snowflake external tables. External tables reference data files located in a cloud storage (Amazon S3, Google Cloud Storage, or Microsoft Azure) data lake. This enables querying data stored in files in a data lake as if it were inside a database. External tables can access data stored in any format supported by COPY INTO <table> statements.

  • Another alternative is Snowflake's Iceberg tables. So, you can think of Iceberg tables as tables that use open formats and customer-supplied cloud storage. This data is stored in Parquet files.

  • Finally, there are the standard Snowflake tables which can be an option to cover the functionality of foreign tables in Teradata

  • If you need more support, you can email us at snowconvert-support@snowflake.com

Last updated