{"id":2974,"date":"2024-03-14T01:00:17","date_gmt":"2024-03-14T08:00:17","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/azure-sql\/?p=2974"},"modified":"2024-03-14T07:53:42","modified_gmt":"2024-03-14T14:53:42","slug":"azure-sql-trigger-binding-for-azure-functions-goes-ga","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/azure-sql\/azure-sql-trigger-binding-for-azure-functions-goes-ga\/","title":{"rendered":"Azure SQL Trigger Binding for Azure Functions goes GA"},"content":{"rendered":"<p>Azure SQL Database Engineering and Product Management would like to announce that Azure SQL Trigger Binding for Azure Functions is now generally available (GA).<\/p>\n<h2>Catching Up<\/h2>\n<p>As a quick refresher, the Azure SQL trigger uses\u00a0<a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/relational-databases\/track-changes\/about-change-tracking-sql-server\" data-linktype=\"absolute-path\">SQL change tracking<\/a> 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 <a href=\"https:\/\/github.com\/Azure\/azure-functions-sql-extension\/tree\/main\/samples\" target=\"_blank\" rel=\"noopener\">here<\/a> 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.<\/p>\n<p>If you recall, there was a post previously on <a href=\"https:\/\/devblogs.microsoft.com\/azure-sql\/change-data-streams-with-azure-sql-db\/\" target=\"_blank\" rel=\"noopener\">creating a change data stream with Azure SQL Database, Change Tracking, and the Trigger Binding<\/a>. This example used .NET as the language so let&#8217;s create one more example using Java.<\/p>\n<h2>Create a Trigger Binding<\/h2>\n<p>Again, this post will be using a codespace for the development environment. You too can use this codespace by just going to <a href=\"https:\/\/github.com\/AzureSQLDB\/JavaSQLTrigger\" target=\"_blank\" rel=\"noopener\">this repository<\/a> and starting one up using the green code button.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-content\/uploads\/sites\/56\/2023\/05\/Screenshot-2023-05-12-064043.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-2042\" src=\"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-content\/uploads\/sites\/56\/2023\/05\/Screenshot-2023-05-12-064043.png\" alt=\"Image Screenshot 2023 05 12 064043\" width=\"409\" height=\"405\" srcset=\"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-content\/uploads\/sites\/56\/2023\/05\/Screenshot-2023-05-12-064043.png 409w, https:\/\/devblogs.microsoft.com\/azure-sql\/wp-content\/uploads\/sites\/56\/2023\/05\/Screenshot-2023-05-12-064043-300x297.png 300w, https:\/\/devblogs.microsoft.com\/azure-sql\/wp-content\/uploads\/sites\/56\/2023\/05\/Screenshot-2023-05-12-064043-150x150.png 150w, https:\/\/devblogs.microsoft.com\/azure-sql\/wp-content\/uploads\/sites\/56\/2023\/05\/Screenshot-2023-05-12-064043-24x24.png 24w, https:\/\/devblogs.microsoft.com\/azure-sql\/wp-content\/uploads\/sites\/56\/2023\/05\/Screenshot-2023-05-12-064043-48x48.png 48w, https:\/\/devblogs.microsoft.com\/azure-sql\/wp-content\/uploads\/sites\/56\/2023\/05\/Screenshot-2023-05-12-064043-96x96.png 96w\" sizes=\"(max-width: 409px) 100vw, 409px\" \/><\/a><\/p>\n<p>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.<\/p>\n<p>The following is a quick video with how to set this up using the <a href=\"https:\/\/github.com\/AzureSQLDB\/JavaSQLTrigger\" target=\"_blank\" rel=\"noopener\">sample repository<\/a>:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-content\/uploads\/sites\/56\/2024\/03\/javaTrigger1.gif\"><img decoding=\"async\" class=\"alignnone size-full wp-image-2981\" src=\"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-content\/uploads\/sites\/56\/2024\/03\/javaTrigger1.gif\" alt=\"Image javaTrigger1\" width=\"1440\" height=\"810\" \/><\/a><\/p>\n<h2>Summary<\/h2>\n<p>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!<\/p>\n<h3>Resources<\/h3>\n<ul>\n<li><a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/azure-functions\/functions-bindings-azure-sql?tabs=isolated-process%2Cextensionv4&amp;pivots=programming-language-java\" target=\"_blank\" rel=\"noopener\">Azure SQL Bindings Documentation<\/a><\/li>\n<li><a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/azure-functions\/functions-bindings-azure-sql-trigger?tabs=isolated-process%2Cportal&amp;pivots=programming-language-java\" target=\"_blank\" rel=\"noopener\">Azure SQL Trigger Documentation<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/Azure\/azure-functions-sql-extension\/tree\/main\/samples\" target=\"_blank\" rel=\"noopener\">Samples Repository<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/AzureSQLDB\/JavaSQLTrigger\" target=\"_blank\" rel=\"noopener\">Blog (Java SQL Trigger) Sample Repository<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>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\u00a0SQL change tracking functionality to monitor a SQL table for changes and trigger a function when a row is created, updated, [&hellip;]<\/p>\n","protected":false},"author":95874,"featured_media":1774,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[510,541,465,469,610,30,449,447,432,441,407,410,34],"class_list":["post-2974","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure-sql","tag-azure-sql-database","tag-azure-functions","tag-azuresql","tag-azuresqldb","tag-c","tag-developers","tag-development","tag-java","tag-javascript","tag-powershell","tag-python","tag-rest","tag-t-sql"],"acf":[],"blog_post_summary":"<p>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\u00a0SQL change tracking functionality to monitor a SQL table for changes and trigger a function when a row is created, updated, [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/posts\/2974","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/users\/95874"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/comments?post=2974"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/posts\/2974\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/media\/1774"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/media?parent=2974"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/categories?post=2974"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/tags?post=2974"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}