0

I am loading files to snowflake tables using Snowpipe. I have already loaded a file named employees1 to snowflake table named Employee_table. I truncated the table and wanted to load that file again. As snowpipe will store load history in metadata for 14days it will not allow to load the same file again to snowflake table. I am not able to use FORCE=TRUE in snowpipe COPY INTO command. Is there any way we can load the files without creating another table.

Alka
  • 1
  • Why are you not able to use FORCE=TRUE? – NickW Mar 24 '22 at 00:33
  • @NickW FORCE=TRUE is not supported in a PIPE – Mike Walton Mar 24 '22 at 00:48
  • @Alka since you've truncated the table, then you could just recreate the PIPE. This Snowpipe history is stored at the PIPE level, so by recreating it, it should load everything again. – Mike Walton Mar 24 '22 at 00:50
  • Question here - will recreating snowpipe create any authentication issue or does value of notification_channel changes if we recreate? – Pankaj Mar 24 '22 at 01:46
  • 1
    @Pankaj Recreating pipe will not have any issues with the notification channel. It is not changed – Alka Mar 24 '22 at 14:27
  • @MikeWalton Thanks Mike. Recreating works. Is there another way without recreating pipe and load the duplicate data? – Alka Mar 24 '22 at 14:28
  • I checked back on documentation for PIPE recreation and it notes to re-validate configuration - "Review the configuration steps for your cloud messaging service to ensure the settings are still accurate" (https://docs.snowflake.com/en/user-guide/data-load-snowpipe-manage.html#recreating-pipes-for-automated-data-loads). Did personally tried re-creating and it worked with no changes needed at cloud end though, so wonder if there could be a case, which is why documentation is pointing to re-validate! – Pankaj Mar 24 '22 at 15:02

0 Answers0