maestro 1.4.0 adds custom pipeline metrics

Wait 5 sec.

[This article was first published on data-in-flight, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. The 1.4.0 release of maestro is out, and with it comes the ability to record custom metrics from your pipelines. Execution time and success/failure were already tracked, but there was no good way to answer questions like “how many rows did this pipeline process?” or “how many API calls did it take?” Now there is.If you haven’t heard of maestro, it’s a pipeline orchestration package. You can learn more about it here.Get it from CRAN:install.packages("maestro")Recording metrics with update_metric()A metric is any value that can be represented as a single number: rows processed, bytes read, API calls made, attempts on a task. To record one, call update_metric() from inside a pipeline with the name of the metric and its value. maestro automatically attributes the metric to the pipeline (and run) that is currently executing.An important design point is that metrics are recorded on the side. They are not part of a pipeline’s return value, so they never get passed downstream in a DAG.Here’s a two-step DAG that extracts some flight data and loads it, recording a few metrics along the way:#' ./pipelines/metric_example.R#' @maestroFrequency 1 hourextract_flights