0

I have models in SQL that update the data everyday automatically. Info about the models is stored in a table. One of the columns I called "error". It is a column with zeros, which change to 1 if the performance of the model is below a certain threshold. Now my question is whether it is possible that I get notified if an entry of the "error" column becomes 1.

The models I discussed are R scripts that I run in SQL. The scripts predict whether a customer makes a purchase or not.

I'm using Microsoft SQL Server.

Zophai
  • 104
  • 9
Stan
  • 45
  • 5

2 Answers2

1

To get a more immediate notification than an email, you can also use a tool like Notify17, which would send you a push notification on your browser/mobile phone (it is very easy to miss out emails).

There is a basic R recipe for it, which boils down to:

notify17 <- function(rawAPIKey, title, content = '') {
  hookURL = paste0("https://hook.notify17.net/api/raw/", rawAPIKey)
  query <- list(title   = title,
                content = content)
  resp <- httr::POST(hookURL, body = query, encode = "form")
  print(httr::content(resp))
}

# Usage:

notify17('RAW_API_KEY',
         "Model training finished")

All you need is to get a raw API key from the dashboard and use it in a script.

cmaster11
  • 527
  • 3
  • 6
0

I used the R script to send an email.

this will explain how to do it: how do you send email from R

Stan
  • 45
  • 5