Call a procedure when there is change in data of view/table in snowflake

Viewed 26

I have a snowflake stored procedure that should be executed when there is a change in data in snowflake view/table.

I tried creating a Stream called mystream that points to a table.

create or replace stream mystream on table TEST1;

And created a Task as

    CREATE or replace TASK mytask1
  WAREHOUSE = TEST_WH
  SCHEDULE = '1 minute'
WHEN
  SYSTEM$STREAM_HAS_DATA('MYSTREAM')
AS
  CAll sp_test_proc('ABC')

However, the stored procedure didn't execute even after SYSTEM$STREAM_HAS_DATA('MYSTREAM') returned TRUE.

1 Answers
Related