Does snowflake supports event triggering to any event bridge, sns topic or kinesis queue?

Viewed 522

As soon as data is inserted into snowflake table, I want to fire any event to any event bridge and sns topic so that i can synchronize the python script to do some other stuffs on top of the data. Does snowflake supports such event triggering to event bridge, sns topic or kinesis queue ?

Thanks, Deepika

1 Answers

I understand you want to trigger a Python script if data is inserted into a table.

You could use a combination of Streams, Tasks and External Functions for the same.

Short explanation:

  1. With Streams you can implement a Change Data Capture-functionality. Streams help you to detect new/changed/deleted rows for a certain table.
  2. Tasks are jobs in Snowflake and they can be triggered based on a certain schedule + under the condition that a Stream has data (i.e. new records have been inserted)
  3. With External Functions you can implement a python script in AWS Lambda and trigger it from Snowflake side. This function is then triggered by the mentioned Task.

Streams: https://docs.snowflake.com/en/user-guide/streams.html

Tasks: https://docs.snowflake.com/en/user-guide/tasks-intro.html

External Functions: https://docs.snowflake.com/en/sql-reference/external-functions-introduction.html

Related