Hi all, for a prefect flow to pass on credentials to the mapped tasks - can I pass a dictionary of credentials or should be split into singular values ?
Copy code
with Flow("example") as flow:
credentials = {'id': ... , 'pass': ...}
apply_map(transform ,result ,unmapped(credentials)) # can we do this ?
apply_map(transform ,result ,id =unmapped(credentials['id']), pass =unmapped(credentials['pass'])) # or is this the standard way?
k
Kevin Kho
09/14/2021, 11:02 PM
I believe
unmapped
will work for you and that is the standard way. No need to split out credentials, at that point I think it depends on what your function takes but both will work
a
Abhas P
09/14/2021, 11:28 PM
sending credentials as a dictionary causes :
raise ValueError("Cycle found; flows must be acyclic!")
which kinda surprised me.
So I stuck to sending the creds as individual unmapped params.
k
Kevin Kho
09/14/2021, 11:43 PM
Oh I just noticed you had the apply_map. If would help us if you could give a simple example because there is an issue here
a
Abhas P
09/15/2021, 4:05 PM
Should I post the example on the github thread or here ?
k
Kevin Kho
09/15/2021, 4:06 PM
github thread is good if you have a small one 🙂
a
Abhas P
09/15/2021, 4:36 PM
Just did !
k
Kevin Kho
09/15/2021, 4:37 PM
Thank you! I really don’t know what is going on with that issue to be honest
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.