itay livni
09/07/2020, 9:31 PMapply_map
the only way to implement a mapped case statement? Thanksapply_map
where a task returns a list but the downstream task is not mapping over the list. Is that expected behavior?
In the diagram I am referring to the bottom most task.Jenny
09/08/2020, 1:54 PMitay livni
09/08/2020, 2:19 PMapply_map
from the add_new_vertex
the root task in the diagram. The input for task new_term_to_make
is a dictionary. When I run this code outside apply_map
, in a flow it runs fine.with case(vertices_to_add.not_(), False):
# getRecdoc = GetItem("resource-doc")
# resource_doc = getRecdoc(first_vert_artifacts, 'resource_doc')
# 1. Extract keyterms
getKeyTerms = GetKeyterms(name="get-rec-keyterms")
keyterm_df_lst = getKeyTerms(
summary_dict=vertices_to_add["vertex"],
resource_doc = vertices_to_add["resource_doc"]
)
# 2. Generate list of new nodes to make
with tags("node-input-list"):
terms_to_make_lst = genKeys.map(
keyterm_df=keyterm_df_lst,
resource_doc=unmapped(vertices_to_add["resource_doc"]),
summary_dict=unmapped(vertices_to_add["vertex"]),
# vertices_to_add=vertices_to_add,
task_args={"name": "new-terms-to-make"}
)
This is the code outside without apply_map
The code inside apply_map
is the same but with unmapped
removed.Jim Crist-Harif
09/08/2020, 2:51 PMitay livni
09/08/2020, 2:56 PMcase
statement is working . I expected one of the terminal task's to be mapped over the inputs...