Will Prefect allow me to access the built in funct...
# ask-community
k
Will Prefect allow me to access the built in functions of the data type being returned by the Task or does the Task object occlude some of those calls? Specifically for dictionaries, can I do somethin glike this:
Copy code
d_task  = task(return some_dict)
m_task = task(lambda x: do_map_stuff(x))

with Flow f as ('flow'):
  some_data = d_task()
  mapped_result = m_task.map(some_data.values())
k
Hi @kevin. No this will not work. You’ll need a helper
task
to get
some_data
, and then pull the values there.
some_data
in this case is not just a dictionary.
k
ah i was fearing that was the case
thank you for clarifying 🙂