简体   繁体   中英

Get file names from S3 bucket

I have a problem. I want to get list of the file names from S3 bucket in Snowflake? Is there anyway how to do it?

I have a problem. I want to get list of the file names from S3 bucket in Snowflake? Is there anyway how to do it?

Yes !

  1. Create an external stage in Snowflake, which references the S3 bucket, using CREATE STAGE. For example:
CREATE STAGE my_s3_stage url = 's3://mybucket/myfiles/' ;

https://docs.snowflake.com/en/sql-reference/sql/create-stage.html

  1. List the files with
LIST my_s3_stage ;

https://docs.snowflake.com/en/sql-reference/sql/list.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM