vincbeck commented on PR #43666:
URL: https://github.com/apache/airflow/pull/43666#issuecomment-2455909705
> Hey, it's not really clear exactly what we're doing with this relationship
and therefore it's kindof hard to review -- we don't know how it will be used,
so it's not clear if this is the right structure as opposed to say a many to
many relationship.
>
> Why do we need a key between the trigger and the asset in order for the
trigger to do something with the asset or in response to an asset update? E.g.
couldn't it just take an asset id as kwargs to the trigger obj?
The goal here is to create a table to store references between assets and
triggers. The relation here is many to many (hence the table). Or maybe I did
something wrong and the relation is not many to many? Nonetheless, the relation
SHOULD be many to many :)
Why do we want to associate assets and triggers? The ultimate goal is to add
`watchers` to assets. These watchers are triggers and whenever the trigger is
triggered ... it updates the asset. See example below:
```
trigger = SqsSensorTrigger(sqs_queue="<my_queue>")
asset = Asset("<my_queue>", watchers=[trigger])
```
Whenever the trigger `trigger` is triggered, the asset `asset` will be sent
an event
> E.g. couldn't it just take an asset id as kwargs to the trigger obj?
I am not sure I understand this one :)
--
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]