0

I am currently working with an operator that returns a continuation token. Considering that the operator is called FrOperator and I have a sensor that will take this operator's continuation token FrSensor.

Airflow doesn't seem to be passing the output when providing the `

expanded_froperator = FrOperator.partial(<FIXED_VALUES>).expand(<SOMETHING>)
expanded_frsensor = FrSensor.partial(<FIXED_VALUES>).expand(expanded_froperator.output)

Any idea what am I doing wrong?

expanded_froperator.output seems to be returning a None value in Xcoms causing the dag to be skipped.

  • 1
    Without knowing the `FrOperator`: Have you tried using a keyword in `.expand()`? `expanded_froperator = FrOperator.partial(...).expand(my_mapped_parameter=) FrSensor.partial(...).expand(my_mapped_parameter= expanded_froperator.output) ` ? – TJaniF Jan 12 '23 at 11:51
  • @TJaniF yes indeed :) still working on the problem. It might night be an Airflow issue. Once i fix it, i might drop the question – noirjaunerouge Jan 12 '23 at 11:54
  • Yeah in that case the issue might lie somewhere within the FrOperator. Makes sense because if you don't use a keyword inside .expand you usually get a specific error telling you to do so :) – TJaniF Jan 12 '23 at 12:05
  • Looks like you have to pass it as `XComArg`: `FrSensor.partial().expand(XComArg(expanded_froperator))` Take a look at the following link: https://airflow.apache.org/docs/apache-airflow/2.3.0/concepts/dynamic-task-mapping.html#mapping-over-result-of-classic-operators – Ricardo Alvaro Lohmann Mar 30 '23 at 18:39

0 Answers0