cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Is it possible to have an alert when a row is added to a table?

DBX123
New Contributor

I currently have a table that periodically adds rows in (sometimes daily, sometimes over a month). I was hoping to have an alert for when a row is added into this. The table has date fields of when rows are loaded in.

I have an alert working, but it just runs and prints the table every day. I was hoping I could do this so that I would only get an email alert if there is a new row.

Any ideas?

Thanks ๐Ÿ™‚

1 REPLY 1

Walter_C
Databricks Employee
Databricks Employee

You could set your alert with query as:

-- Custom alert to monitor for new rows added to a table
SELECT COUNT(*) AS new_rows
FROM your_table
WHERE event_time > current_timestamp() - interval '1' hour

In this example, the query checks for rows added to your_table within the last hour. If the query returns a non-zero count, the alert will be triggered.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group