Replies: 1 comment
-
This is not feasible in
You could write # _targets.R file
do_task3 <- TRUE
library(targets)
constant_part <- list(
tar_target(task1, do_task1()),
tar_target(task2, do_task2())
)
if (do_task3) {
variable_part <- tar_target(task3, do_task3())
} else {
variable_part <- NULL
}
list(constant_part, variable_part) |
Beta Was this translation helpful? Give feedback.
-
Help
Description
Hello,
I'm wondering if there is an option to have similar functionality as
tar_target( ..., cue = tar_cue_skip(TRUE)
but skip even if the target has never been built.For more context, incase someone has other ideas:
I'm in a situation where I need to handover a pipeline, I'd like to have a version that connects to a database and API. And another version that runs out of the box, replacing the API reponse and database queries with parquet files that I can include in the handover. Then hopefully I can easily change a variable that would switch between the two versions. This is because the API calls and database queries take a lot of time.
Thank you, I appreciate your help!
Cheers,
E
Beta Was this translation helpful? Give feedback.
All reactions