2

I am trying to use Event Grid to kick off an Azure Data Factory pipeline when a new record is inserted into an Azure SQL database table. But, I'm lost at the start of things.

When creating the new subscription, I think I would choose Custom Input Schema but I'm not sure where to even start with where to get the "Event Type" from. Is there a list of types somewhere? Is this in the documentation of Azure SQL or Event Grid?

What is the right event type? Any help would be appreciated.

Reference: https://learn.microsoft.com/en-us/azure/event-grid/event-sources

NOTE: I cannot use Logic Apps for this as that has not been approved by our Azure architecture team. I say this because Logic Apps SQL connector now allows for a trigger based on SQL table insert -- no matter though, because I cannot use Logic Apps :(

AHazel
  • 25
  • 1
  • 5

2 Answers2

5

At this moment, SQL Database doesn't publish events to Event Grid, so you can't use this approach.

You can change your code and right after insert on SQL, publish a custom event to Event Grid, or switch to CosmosDB which offers the Change Feed (which you can subscribe and react to events)

Thiago Custodio
  • 17,332
  • 6
  • 45
  • 90
  • After scouring the azure portal for an hour, I believe your answer to be true. This contradicts the "What is Azure Event Grid?" page that specifically says "... use Event Grid to notify Azure Automation when a virtual machine or database in Azure SQL is created". [source](https://learn.microsoft.com/en-us/azure/event-grid/overview#event-sources) – StingyJack Jul 05 '20 at 21:52
  • I will follow this internally with MSFT engineers. – Thiago Custodio Jul 05 '20 at 22:09
  • @ThiagoCustodio The documentation is still refers to use Event Grid to notify Azure Automation when a virtual machine or database in Azure SQL is created, did you get any clarity from MSFT engineers on this, now possible maybe? – Sergio Solorzano Aug 17 '22 at 17:20
  • Unfortunately, no news =/ – Thiago Custodio Aug 17 '22 at 17:44
1

Yes, at the moment there is no event sync integration to the Azure Event grid, however, for purpose of exploring other venues, you might find Debezium a place for syncing most of the data sources into a Kafka or other streams with little custom code.

Reference SQL Server Debezium Connector

Note: the few of the connectors are in testing phase, and it is a little time taking task to write or customize the connector, but can be done.

I felt this technology mostly usefull for integrating or migrating complex distributed systems with legacy components working together.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
solmon
  • 41
  • 1
  • 6