Azure SQL Trigger Binding for Azure Functions goes GA

Brian Spendolini

Azure SQL Database Engineering and Product Management would like to announce that Azure SQL Trigger Binding for Azure Functions is now generally available (GA).

Catching Up

As a quick refresher, the Azure SQL trigger uses SQL change tracking functionality to monitor a SQL table for changes and trigger a function when a row is created, updated, or deleted. It can be used in many scenarios such as change streaming from an Azure SQL database, participating in event-based architectures, as well as real time updating of web pages and applications. The GitHub samples repository is located here if you would like to try out the trigger binding as well as the input and output bindings. Lastly, the SQL Bindings are available to be created using Java, C#, JavaScript, Python, and PowerShell.

If you recall, there was a post previously on creating a change data stream with Azure SQL Database, Change Tracking, and the Trigger Binding. This example used .NET as the language so let’s create one more example using Java.

Create a Trigger Binding

Again, this post will be using a codespace for the development environment. You too can use this codespace by just going to this repository and starting one up using the green code button.

Image Screenshot 2023 05 12 064043

Once the codespace is up and running, start building a trigger or use the one that is in the repository. Just create a database using sqlcmd (directions in the read me) or connect it to your Azure SQL instance. The db_objects.sql file contains the T-SQL for creating the table and enable change tracking in the database.

The following is a quick video with how to set this up using the sample repository:

Image javaTrigger1

Summary

With the Azure SQL Trigger Binding going GA, developers have the ability to create change data streams from their SQL Databases with little to no code. Using VS Code, local development environments and Azure Functions, development to deployment is a simple, easy process. As always, please provide us with any comments or feedback you have!

Resources

2 comments

Leave a comment

  • Amit SinghMicrosoft employee 0

    This is great and on time for our team. We were exploring Debezium to stream the changes from Azure SQL Server, with CDC enabled, to event hub. Please can you share which approach will be better to stream the changes from SQL SERVER.

Feedback usabilla icon