Foundry can integrate with Snowflake through the Snowflake connector.
Snowflake can integrate with Foundry-managed Iceberg tables through an Apache Iceberg REST catalog integration ↗. If you encounter issues with these instructions, follow the authentication troubleshooting instructions.
Currently, Snowflake only supports reading Foundry-managed Iceberg tables with bring-your-own-bucket storage.
Snowflake does not currently support reading tables with client-side encryption.
Enable your Snowflake instance to egress to your Foundry instance and to the Iceberg storage bucket.
Configure network ingress in Foundry to allow your Snowflake instance to connect to Foundry.
Run the following query in Snowflake to create a catalog integration ↗. You need to use the ACCOUNTADMIN role ↗ to run the query. See the Snowflake documentation ↗ for more details.
The following example uses OAuth2 authentication:
Copied!1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19CREATE CATALOG INTEGRATION <name_your_integration> CATALOG_SOURCE = ICEBERG_REST TABLE_FORMAT = ICEBERG ENABLED = TRUE CATALOG_NAMESPACE = '<your_foundry_namespace>' -- Foundry folder, for example 'FoundryNamespace.MyProject.tables' for /FoundryNamespace/MyProject/tables REST_CONFIG = ( CATALOG_NAME = 'foundry' CATALOG_URI = 'https://<your_foundry>/iceberg' CATALOG_API_TYPE = 'public' ACCESS_DELEGATION_MODE = VENDED_CREDENTIALS ) REST_AUTHENTICATION = ( TYPE = OAUTH OAUTH_TOKEN_URI = 'https://<your_foundry>/iceberg/v1/oauth/tokens' OAUTH_CLIENT_ID = '<client_id>' OAUTH_CLIENT_SECRET = '<client_secret>' OAUTH_ALLOWED_SCOPES = ( 'api:iceberg-read', 'api:iceberg-write' ) );
Verify that the integration is configured correctly by running the following query. See Snowflake documentation ↗ for more details.
Copied!1SELECT SYSTEM$VERIFY_CATALOG_INTEGRATION('<your_integration_name>');
Verify that you can list namespaces ↗ and list Iceberg tables ↗ from the Foundry Iceberg REST catalog.
Copied!1 2 3 4 5 6 7 8 9 10SELECT SYSTEM$LIST_NAMESPACES_FROM_CATALOG( '<your_integration_name>', '<your_foundry_folder>', -- Foundry folder, for example 'FoundryNamespace.MyProject.tables' for /FoundryNamespace/MyProject/tables 1 ); SELECT SYSTEM$LIST_ICEBERG_TABLES_FROM_CATALOG( '<your_integration_name>', '<your_foundry_folder>', -- Foundry folder, for example 'FoundryNamespace.MyProject.tables' for /FoundryNamespace/MyProject/tables 1 );
Create a table that links to a Foundry table and verify that you can read data from it. This only reads data from Foundry, and does not overwrite or delete the table.
Copied!1 2 3 4 5 6 7CREATE OR REPLACE ICEBERG TABLE <database>.<schema>.<name_your_table_in_snowflake> CATALOG = '<your_integration_name>' CATALOG_TABLE_NAME = '<table_rid>' -- or '<table_name_in_foundry>' CATALOG_NAMESPACE = 'foundry' -- or '<table_namespace_in_foundry>' for example 'FoundryNamespace.MyProject.tables' for /FoundryNamespace/MyProject/tables AUTO_REFRESH = TRUE; SELECT * FROM <database>.<schema>.<name_your_table_in_snowflake>;
Write data to a Foundry Iceberg table in Snowflake.
Copied!1 2 3 4INSERT INTO <database>.<schema>.<name_your_table_in_snowflake> VALUES <value_1>, <value_2>, <value_3>;
Create a new database linked to the catalog integration:
Copied!1 2 3 4CREATE DATABASE <name_your_integration_database> LINKED_CATALOG = ( CATALOG = '<your_integration_name>' );
Verify the catalog link status. See the Snowflake documentation ↗ for more details.
Copied!1SELECT SYSTEM$CATALOG_LINK_STATUS('<name_your_integration_database>');