1

Kind of self-explaining title ^_^

I have a Snowpipe job that ingests datafiles into a Snowflake staging table. Is it possible to trigger a stored procedure call at the end of Snowpipe job, instead of having Snowflake task running it, based on recurrent schedule?

Thanks for helping,

tivivi
  • 77
  • 7
  • Not possible as far as I know. – Sergiu Sep 09 '22 at 12:56
  • 1
    Not currently, but if you haven't already you can put a stream on the staging table. You can then use the system$stream_has_data function in the task definition. It will not run the task if there are no new rows in the staging table. (You'll have to do something in the SP to consume the rows in the stream, even if you don't use them in a DML.) – Greg Pavlik Sep 09 '22 at 14:11
  • Thanks both. Reading the documentation, I understand that stream functionality is intended for local (Snowflake) tables, not for external ones (SQL Server's, in my case) And my purpose is to avoid using tasks, inside which I must run CDC delta processing for all tables (e.g one huge SP in a single task) vs one smaller SP in each table-bound task – tivivi Sep 10 '22 at 14:50

0 Answers0