PUT file to table stage from local computer to snowflake table stage

Viewed 297

I am new to snowflake so please give me some mercy here :-)

I am trying to stage a file to a table stage via snowsql. i have warehouse, database name, schema name all set. I also have the table created however when trying to PUT a file i get a SSL validation error to s3

kywils2#COMPUTE_WH@KW_POC_DB.MDBPRD_MASTER_DM>show TABLES;
+-------------------------------+----------------------------+---------------+------------------+-------+---------+------------+------+-------+----------+----------------+----------------------+-----------------+---------------------+------------------------------+---------------------------+-------------+
| created_on                    | name                       | database_name | schema_name      | kind  | comment | cluster_by | rows | bytes | owner    | retention_time | automatic_clustering | change_tracking | search_optimization | search_optimization_progress | search_optimization_bytes | is_external |
|-------------------------------+----------------------------+---------------+------------------+-------+---------+------------+------+-------+----------+----------------+----------------------+-----------------+---------------------+------------------------------+---------------------------+-------------|
| 2021-07-16 10:00:25.390 -0700 | MDM_CL_FR_DONATIONS_543611 | KW_POC_DB     | MDBPRD_MASTER_DM | TABLE |         |            |    0 |     0 | SYSADMIN | 1              | OFF                  | OFF             | OFF                 |                         NULL |                      NULL | N           |
+-------------------------------+----------------------------+---------------+------------------+-------+---------+------------+------+-------+----------+----------------+----------------------+-----------------+---------------------+------------------------------+---------------------------+-------------+

my command:

put file://c:\\Users\kywils\Documents\IT_DBA\snowflake_training\snowpipe_testing\MDBPRD_MASTER_DM_MDM_CL_FR_DONATIONS_543611_splitaa.gz @%MDM_CL_FR_DONATIONS_543611;

error:

SSL validation failed for https://sfc-va2-ds1-28-customer-stage.s3.amazonaws.com/?accelerate [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)

from my understanding is that table stages are a type of snowflake internal storage, so i am confused as to why it would even try to go to S3?

i have tried double back slashes in the file name. I have also tried using a name stage but i get the same error.

1 Answers

from my understanding is that table stages are a type of snowflake internal storage, so i am confused as to why it would even try to go to S3?

When Snowflake is running on AWS, all files stored in internal stages are in S3. An internal stage is still S3, just an area Snowflake manages. All table and materialized view storage is also S3.

When you can get to your Snowflake account through the web UI or a client like SnowSQL but can't get to an internal stage, it's usually a network device doing packet inspection. Devices such as Zscalar, Palo Alto, Cisco Umbrella, and others sit between your client and the public internet. Sometimes they will get confused by the Snowflake SSL certificate for internal stages on S3 (or Azure Blob, or GCP storage).

To address this, you should start by running this command:

select SYSTEM$WHITELIST();

With the output of this command, you can ask your network administrators to exclude all URLs for the given ports (443 or 80) from packet inspection -- basically a clear path. When Snowflake provisions an account, these URLs are bound to the account and do not change. The IP numbers they use can and will change, so you can tell the networking team that's not an option. They can open a range of IPs, but it would be extensive - all of the AWS range.

You can confirm that all required network paths are clear by running SnowCD using the output from the SYSTEM$WHITELIST() function.

https://docs.snowflake.com/en/user-guide/snowcd.html

Related