arthur-plautz commented on PR #51254:
URL: https://github.com/apache/airflow/pull/51254#issuecomment-2931651487

   > @arthur-plautz, this looks great! One question; have you been able to test 
this? I've heard that folks have had issues running a `Variable.set(...)` in 
the Triggerer.
   
   You're right, triggerer isn't allowed to use the `.set()` method, as 
expected. I had only tested DAG parsing so far, I was able to make it work with 
something like this:
   ```python
       @task(inlets=[cdc_asset])
       def trigger_example(*, inlet_events):
           events = inlet_events[cdc_asset]
           results = events[-1].extra["payload"]
           cdc_trigger.update_state({"row_count": results["row_count"]})
   ```
   I'll include some state validation for the `update_state` method and maybe a 
nicer way to call it. The `__init_state` method ran fine, since it's executed 
from within scheduler container.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to