itay livni
10/10/2019, 8:50 PMpass
on a if else branch?Jeremiah
10/10/2019, 11:52 PMpass
happens? You can absolutely make a task that does nothing but pass
, in which case it will return a Success
state to any downstream tasks containing no result.itay livni
10/11/2019, 12:05 AMJeremiah
10/11/2019, 1:34 AMx_lst.value_count().max()
). In Prefect, task results are not known until the flow is run, and consequently all operations — including things like some_str is "short"
— must happen inside the run()
method of a Task
object.ifelse
, you’re saying “if the first task evaluates True
, run the second task; otherwise run the third task”:
ifelse(conditional_task, true_task, false_task)
another_task_on_true_branch.set_upstream(true_task)
another_task_on_false_branch.set_upstream(false_task)
itay livni
10/11/2019, 3:32 AMtermsense_stat_response["min_num_term_senses"]>1
has to be a task? Here is an implementation of what I am trying to do in an aws state machineJeremiah
10/11/2019, 3:45 AMTask
. In this case, you could use an ifelse
to run task1
if the condition is true, or task2
if the condition is false. You could also call task2.set_upstream(task1)
. This way task 2 will always run, but task 1 will only run if the condition is met.