当我在 Snowflake 中运行此脚本时:
COPY FILES INTO @az_uksdistrib/
FROM @az_uksdistrib/Archived
FILES = ('RFPT.9439.005589.DAT')
要“取消归档”文件并将其放回阶段的根目录中,该操作大约需要一分钟,尽管成功完成,但文件实际上并未复制。当在光标上运行多个文件时,每个文件大约需要一分钟。
该位置
@az_uksdistrib/Archived
确实有大约 100,000 个小 DAT
文件(< 5MB) which I thought might be a part of the issue, but there are no timeout errors or anything like that.
编辑 - 我重新运行查询,并将
DETAILED_OUTPUT
设置为 TRUE
,但结果窗格中的唯一输出是 Query produced no results.
想通了。目标路径末尾需要一个斜杠:
COPY FILES INTO @az_uksdistrib/
FROM @az_uksdistrib/Archived/
FILES = ('RFPT.9439.005589.DAT')
复制文件仍然需要一分钟,但我认为这是因为源位置中有大量文件。