Class for an individual maestro pipeline A pipeline is defined as a single R script with a schedule or input
Class for an individual maestro pipeline A pipeline is defined as a single R script with a schedule or input
new()Create a new Pipeline object
MaestroPipeline$new(
script_path,
pipe_name,
frequency = NA_character_,
start_time = lubridate::NA_POSIXct_,
tz = NA_character_,
hours = NULL,
days = NULL,
months = NULL,
skip = FALSE,
log_level = "INFO",
inputs = NULL,
outputs = NULL,
priority = Inf,
flags = c(),
run_if = NULL
)script_pathpath to the script
pipe_namename of the pipeline
frequencyfrequency of the pipeline (e.g., 1 day)
start_timestart time of the pipeline
tztime zone of the pipeline
hoursspecific hours of the day
daysspecific days of week or month
monthsspecific months of year
skipwhether to skip the pipeline regardless of scheduling
log_levellog level of the pipeline
inputsnames of pipelines that this pipeline is dependent on for input
outputsnames of pipelines for which this pipeline is a dependency
prioritypriority of the pipeline
flagsarbitrary pipelines flags
run_ifstring representing an R expression that can be evaluated and returns TRUE or FALSE; or NULL
MaestroPipeline object
run()Runs the pipeline
MaestroPipeline$run(
resources = list(),
log_file = tempfile(),
quiet = FALSE,
log_file_max_bytes = 1e+06,
.input = NULL,
cli_prepend = "",
log_to_console = FALSE,
...
)resourcesnamed list of arguments and values to pass to the pipeline
log_filepath to the log file for logging
quietwhether to silence console output
log_file_max_bytesmaximum bytes of the log file before trimming
.inputinput values from upstream pipelines
cli_prependtext to prepend to cli output
log_to_consolewhether or not to output statements in the console (FALSE is to suppress and append to log)
...additional arguments (unused)
invisible
get_pipe_name()Get the pipeline name
MaestroPipeline$get_pipe_name()pipeline_name
get_schedule()Get the schedule as a data.frame
MaestroPipeline$get_schedule()data.frame
check_timeliness()Check whether a pipeline is scheduled to run based on orchestrator frequency and current time
MaestroPipeline$check_timeliness(
orch_unit,
orch_n,
check_datetime = lubridate::now(),
...
)orch_unitunit of the orchestrator (e.g., day)
orch_nnumber of units of the frequency
check_datetimedatetime against which to check the timeliness of the pipeline (should almost always be now)
...unused
MaestroPipeline
get_status()Get status of the pipeline as a data.frame
MaestroPipeline$get_status()data.frame
get_status_chr()Get status of the pipeline as a string
MaestroPipeline$get_status_chr()character
get_outputs()Names of pipelines that receive input from this pipeline
MaestroPipeline$get_outputs()character
get_inputs()Names of pipelines that input into this pipeline
MaestroPipeline$get_inputs()character
get_priority()Get priority of the pipeline
MaestroPipeline$get_priority()numeric
get_artifacts()Get artifacts (return values) from the pipeline
MaestroPipeline$get_artifacts()list
get_errors()Get list of errors from the pipeline
MaestroPipeline$get_errors()list
get_warnings()Get list of warnings from the pipeline
MaestroPipeline$get_warnings()list
get_messages()Get list of messages from the pipeline
MaestroPipeline$get_messages()list
get_flags()Get the flags of a pipeline as a vector
MaestroPipeline$get_flags()character
update_inputs()Update the inputs of a pipeline
MaestroPipeline$update_inputs(inputs)inputscharacter vector of inputting pipeline names
vector
update_outputs()Update the outputs of a pipeline
MaestroPipeline$update_outputs(outputs)outputscharacter vector of outputting pipeline names
vector
get_run_sequence()Get the run sequence of a pipeline
MaestroPipeline$get_run_sequence()outputscharacter vector of times
vector
clone()The objects of this class are cloneable with this method.
MaestroPipeline$clone(deep = FALSE)deepWhether to make a deep clone.