CloudEvent to trigger Data Factory pipeline

TOMA 0 Reputation points
2024-09-23T10:00:15.1633333+00:00

Hey,

I have a question if it is possible to start a pipeline in synapse via custom trigger, but with an event that will be in CloudEvent format.

I was able to do it with an event in EventGrid format by following this article
https://medium.com/@ashish.kharbanda/triggering-azure-data-factory-pipeline-when-a-pipeline-execution-in-some-other-data-factory-2e3909e8dc10

However, the question is whether it is possible to do it with CloudEvent schema, when trying to create a trigger I get an error.

InternalServerError executing request

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
Azure Event Grid
Azure Event Grid
An Azure event routing service designed for high availability, consistent performance, and dynamic scale.
{count} votes

2 answers

Sort by: Most helpful
  1. TOMA 0 Reputation points
    2024-09-24T10:01:10.8966667+00:00

    Thanks for the answers, however, I followed what you described, as I created an event grid custom topic, where I set the input schema to CloudEventSchemaV1_0.

    eventgrid1

    I checked if the subscription is registered with resource provider.

    eventgrid2 eventgrid3 eventgrid4

    I created a custom trigger as below, selecting the appropriate event grid,eventgrid6

    However, when trying to activate this trigger I get this message in Synapse

    User's image

    and in Event grid, I came across this error message

    eventgrid5

    The test message I send looks like the following, I get no error when sending.

    {
        "specversion" : "1.0",
        "type" : "com.example.someevent",
        "source" : "/mycontext",
        "id" : "C234-1234-1234",
        "time" : "2018-04-05T17:31:00Z",
        "comexampleextension1" : "value",
        "comexampleothervalue" : 5,
        "datacontenttype" : "application/json",
        "data" : {
            "appinfoA" : "abc",
            "appinfoB" : 123,
            "appinfoC" : true
        }
    }
    
    0 comments No comments

  2. phemanth 15,855 Reputation points Microsoft External Staff Moderator
    2024-09-25T11:22:06.1866667+00:00

    @TOMA

    please check the below steps

    1. DataContentType: Try changing datacontenttype to datacontenttype with a value of application/cloudevents+json in your CloudEvent schema.
    2. Event Grid Subscription: Double-check that your Event Grid subscription is correctly configured and that the subscription is active.
    3. Network or Permission Issues: Verify that there are no network or permission issues that might be preventing the trigger from executing.

    To further troubleshoot the issue, I recommend checking the following:

    • Check the Event Grid subscription logs to see if there are any additional error messages.
    • Verify that the Azure Synapse pipeline has the necessary permissions to receive events from the Event Grid topic.
    • Try sending a test event with a simplified payload to see if the issue persists.

    If you're still encountering issues, please provide more details about the error messages,

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.