Attaching a Glue trigger to a workflow in CDK

910 Views Asked by At

I created a workflow and a trigger in CDK, but when I look at the console, the workflow is empty. Any ideas about how to attach my trigger to my workflow?

    my_workflow = glue.CfnWorkflow(
        self,
        "MyWorkflow"
    )

    my_trigger = glue.CfnTrigger(
        self,
        "My Trigger",
        actions=[
            glue.CfnTrigger.ActionProperty(
                crawler_name=my_crawler.name
            )],
        type='ON_DEMAND',
        workflow_name=my_workflow.name,
    )
1

There are 1 best solutions below

1
On

My guess is that the trigger wont show up in the workflow alone, you need some source, or job, or something to connect the trigger to in order for it to appear