Hi, I am using Prefect 3 and are trying to use a ...
# ask-community
t
Hi, I am using Prefect 3 and are trying to use a compound event trigger to trigger a Deployment. Triggering the Deployment works, but, I can not get it to work passing parameters with data from the events to the Triggered Deployment. See the compound trigger example here: https://docs.prefect.io/v3/automate/events/automations-triggers#define-triggers-in-prefect-yaml When I reference
{{ event }}
I just get
None
.
{{ event }}
works fine for my other Deployments which are triggered by a single event. So, my Deployment is triggered. But with
None
as parameter instead of the actual events triggering the Deployment. What is the proper way to manage Parameters for compound triggers? I guess the example I referenced above from the documentation is broken, or am I'm getting it wrong? I am using a
prefect.yaml
file for the Deployments. We are using Prefect server docker image:
prefecthq/prefect:3.0.8-python3.11
Bumped to
prefecthq/prefect:3.1.5-python3.11
. Did not help.
Same behavior when switching from a compound trigger to sequence.
Or when switching from
require: "all"
to
require: "any"
for compound trigger.
v
#CL09KU1K7 I have the same issue, I used the below deployment but {{event}} payload is coming as none. Also as I have multiple events, how can I take both events payload coming through both events
deployments: - name: my-deployment-both-event2 entrypoint: flow.py:TriggerOnBothEvent2 work_pool: name: my-demo-pool triggers: - type: compound require: all parameters: param_1: "{{external.resource.event2.payload}}" param_2: "test data 2" triggers: - type: event match: prefect.resource.id: my.external.resource expect: - external.resource.event1 - type: event match: prefect.resource.id: my.external.resource expect: - external.resource.event2
t