0
votes

I coudln't load the samefile into table in snowflake using COPY command/snowpipe. I am always getting the following result

Copy executed with 0 files processed.

  1. I have re-created the table. Truncated the table. But the copy_history doesn't show any data
select * from table(information_schema.copy_history(table_name=>'mytable', start_time=> dateadd(hours, -10, current_timestamp())));
  1. I have used FORCE = true in COPY Command and COPY command didnt load the same file into Table. I have explicitly mentioned file path in COPY COMMAND
 FROM
           @STAGE_DEV/myfile/05/28/16/myfile_1.csv

   ) file_format = (
       format_name = STANDARD_CSV_FORMAT Skip_header = 1 FIELD_OPTIONALLY_ENCLOSED_BY = '"' NULL_IF = 'NULL'
   ) 
   on_error = continue 
   Force = True;

Anyone faced similar issue and what would the process to load the same file again using COPY command or SNOWPIPE ? I dont have option to change file name or put the files in different S3 bucket.

ls@stage shows the following files ls@stage

1
Are you sure that file exists? ls @STAGE_DEV/myfile/05/28/16/myfile_1.csvGokhan Atil
Are you able to list the files in the stage? list @my_csv_stage;FKayani
Yes, I can list stage files and i have even tried ALTER PIPE REFRESH and it send 10 files.kar Sir
Try removing on_error=continue, as default behavior is to abort statement. Maybe you're getting errors. See if that shows any errors.Sergiu
I have changed copy command FROM clause to @STAGE_DEV/myfile instead of @STAGE_DEV/myfile/05/28/16/myfile_1.csv and it loaded all 10 files. Can't a copy command be used to load individual file? Or Is my statement not correct to load a speciifc file. The File gets loaded into S3 in 10 Parts.kar Sir

1 Answers

0
votes

I have reloaded files to S3 bucket and it's working. Thank you guys for all the responses. –