0

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.

1 Answer 1

0

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.