SSC-EWI-TD0076

The use of foreign tables is not supported in Snowflake.

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:

IN -> Teradata_01.sql
SELECT cust_id, income, age FROM 
FOREIGN TABLE (SELECT cust_id, income, age FROM twm_customer)@hadoop1 T1;

Output code:

OUT -> Teradata_01.sql
SELECT
cust_id,
income,
age FROM
!!!RESOLVE EWI!!! /*** SSC-EWI-TD0076 - 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 foreign 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