Email Alerts: How to make the flow stop if the sink with a blocking alert does not receive data?

Problem Description:

I would like to make a flow fail if the sink with a blocking alert does not any receive data.

Solution:

This is somewhat counterintuitive, as blocking alerts only trigger if the target receives data. If you want the absence of data to stop the flow instead, you must apply the pattern explained here.

Upstream of the blocking target:

  • add an aggregation that simply counts the number of rows (no column grouping, just a count operation)

image655

  • this will produce a single row with the number of aggregated rows: in the absence of data, this will be zero:

image656

  • then simply add a filter that lets through the row where count is zero

  • the blocking alert will trigger because data will be written to the target (one row with a value of zero).

image657