简体   繁体   English

SNOWFLAKE COPY 命令不复制里面的数据

[英]SNOWFLAKE COPY Command not copying data inside

Im getting started with Snowflake and something I dont understand.我开始使用雪花和我不明白的东西。 I tried to issue a copy command as below but it shows no rows processed.我尝试发出如下复制命令,但它显示未处理任何行。

copy into customer
  from @bulk_copy_example_stage
  FILES = ('dataDec-9-2020.csv')
  file_format = (type = csv field_delimiter = '|' skip_header = 1)
  FORCE=TRUE;

I tried with another file from the same S3 folder我尝试使用同一个 S3 文件夹中的另一个文件

copy into customer
  from @bulk_copy_example_stage
  FILES = ('generated_customer_data.csv')
  file_format = (type = csv field_delimiter = '|' skip_header = 1)
  FORCE=TRUE;

And this worked.这奏效了。

At this stage im pretty sure that something was wrong with my first file.在这个阶段,我很确定我的第一个文件有问题。 but my question is, how do we get to print out what the error was?但我的问题是,我们如何打印出错误是什么? all it shows in the console is as below which is not really helpful.它在控制台中显示的所有内容如下所示,这并没有真正的帮助。

在此处输入图像描述

You could try looking at the copy_history to find out what's wrong with the file.您可以尝试查看 copy_history 以找出文件有什么问题。

Reference: copy_history参考: copy_history

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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