0
votes

I uploaded a zipped folder which contained about 200 sub folders and about 3000 XML files per sub folder to an internal stage in snowflake.

Im having trouble putting the XML files into a table I created. I am running the command below to try to and upload the files, but it returns with no files uploaded. Any ideas? I guess my question is is how do I tell snow sql to access the XML files in my folder and sub folders to put them into my table.

copy into trial_data_xml from @clinical file_format='xml_load' pattern='././.*[.]xml[.]gz';

1

1 Answers

1
votes

If you only have XML files in your stage, the following command will copy all of them:

copy into trial_data_xml 
from @clinical 
file_format = (format_name = 'xml_load');

More information: https://docs.snowflake.com/en/user-guide/data-load-local-file-system-copy.html