Reputation: 413
I am new to Snowflake and I have searched this in Stackoverflow but I couldn't find a solution yet.
I'd like to have this import from multiple folders
copy into WWD.PUBLIC.July2
from @my_s3_stage/2024-07-02/
file_format = CSV_FFV2
force=True;
For example 2024-07-02 and 2024-07-03 and 2024-07-04, is it possible?
I tried the below but it doesn't work
COPY INTO WWD.PUBLIC.July2
FROM @my_s3_stage
FILE_FORMAT = (TYPE = CSV)
PATTERN = '.*2024-07-(02|03|04)/.*'
FORCE = TRUE;
Is it even possible?
Thankyou.
Upvotes: 0
Views: 612
Reputation: 9798
Yes, using the FILES or PATTERN parameters as discussed in the documentation here: https://docs.snowflake.com/en/sql-reference/sql/copy-into-table#optional-parameters
Upvotes: 0