Search code examples
azure-cognitive-search

Auto sync Azure SQL DB data to Azure search index


I want to sync any DML operations on Azure SQL DB to azure search index immediately.

I have gone through this question. How does Auto-indexing/sync of Azure SQL DB with Azure Search Works?

No answer in this question. This was posted almost 5 yrs back. With integrated change policy in place do we have auto sync feature by any means now.

Function app does not have a SQL trigger event attached.

I don't want to do a while true loop or any timer or call indexer when data gets update. Please suggest if there are any other best approach or any build feature.


Solution

  • Azure Functions don't have a SQL trigger but Logic Apps do: https://learn.microsoft.com/en-us/azure/connectors/connectors-create-api-sqlazure Logic Apps can also trigger functions and custom APIs, so you should be able to trigger an indexing operation from a SQL operation this way. Do keep in mind however that the indexing process itself may be delayed or take time once triggered so your index may not immediately reflect the changes, depending on payload.