We are using a scheduled job to execute source_changes() to notify via email when any base view(s) no longer match their underlying data source. It works great when there are no errors, such as connectivity issues on the data source of any base views being checked. However, when there is an error, it does not send any email. Any suggestions for how to work around this? Is this "expected behavior?"
FYI - here is the query being executed in the job: SELECT sc.*, bv.* FROM (SELECT * FROM source_changes()) sc INNER JOIN (Select * from GET_VIEWS () WHERE database_name = 'xxx' and view_type = 0) bv ON sc.table_name = bv.name WHERE sc.modification <> ''