I am trying to pass values which are returned from a task after using expand. The return type if you use dynamic mapping and expand in Airflow is the return type changes to _LazyXComAccess which is essentially a list.
t1 = PythonOperator.partial(
task_id="invoke_lambda",
retries=1,
retry_delay=timedelta(seconds=30),
python_callable=invoke_lambda_function,
).expand(op_kwargs=generate_lambda_config())
How do you access the values and use it to trigger a following task for each value from the returned task?
I have tried using it directly like the following
t2 = invoke_second_lambda.expand(payload=XComArg(t1))
However this throws
botocore.errorfactory.TooManyRequestsException: An error occurred
(TooManyRequestsException) when calling the Invoke operation (reached
max retries: 4): Rate Exceeded.
Any ideas?