JosephCatrambone-Gridware commented on issue #56494:
URL: https://github.com/apache/airflow/issues/56494#issuecomment-3439346216
Thanks for the reply. On a similar note, it appears as though the
ProduceToTopicOperator doesn't have a way to take any input from other tasks in
the graph. One can provide a function to the method, but if we have, say, an
existing batch of tasks which produce a list of dicts then the following isn't
possible:
```python
with DAG(...) as dag:
@task.python
def my_sample_producer():
return [{"key": "foo", "value":"..."}, {"key": "..."}, ...]
prod = ProduceToTopicOperator(
topic=OUTPUT_TOPIC,
producer_function=this_method_will_be_called_but_we_cant_read_from_other_tasks,
)
my_sample_producers() >> prod
```
I feel like it still makes sense from an admittedly fuzzy aesthetics and
composability perspective for these things to be able to accept and/or produce
Kafka messages, but I can respect not wanting to have two ways to accomplish
this.
--
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]