Skip to content

Commit c510b7e

Browse files
Merge pull request #297591 from JetterMcTedder/patch-1
consumption plan
2 parents dc08d23 + 5b0dc71 commit c510b7e

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

articles/azure-functions/functions-bindings-azure-sql-trigger.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,21 @@ ms.custom:
99
- devx-track-js
1010
- devx-track-python
1111
- ignite-2023
12-
ms.date: 6/26/2024
12+
ms.date: 4/23/2025
1313
ms.author: bspendolini
1414
ms.reviewer: glenga
1515
zone_pivot_groups: programming-languages-set-functions-lang-workers
1616
---
1717

1818
# Azure SQL trigger for Functions
1919

20-
> [!NOTE]
21-
> In consumption plan functions, automatic scaling is not supported for SQL trigger. If the automatic scaling process stops the function, all processing of events will stop and it will need to be manually restarted.
22-
>
23-
> Use premium or dedicated plans for [scaling benefits](functions-scale.md) with SQL trigger.
24-
>
20+
The Azure SQL trigger uses [SQL change tracking](/sql/relational-databases/track-changes/about-change-tracking-sql-server) functionality to monitor a SQL table for changes and trigger a function when a row is created, updated, or deleted. For configuration details for change tracking for use with the Azure SQL trigger, see [Set up change tracking](#set-up-change-tracking-required). For information on setup details of the Azure SQL extension for Azure Functions, see the [SQL binding overview](functions-bindings-azure-sql.md).
2521

26-
The Azure SQL trigger uses [SQL change tracking](/sql/relational-databases/track-changes/about-change-tracking-sql-server) functionality to monitor a SQL table for changes and trigger a function when a row is created, updated, or deleted. For configuration details for change tracking for use with the Azure SQL trigger, see [Set up change tracking](#set-up-change-tracking-required). For information on setup details of the Azure SQL extension for Azure Functions, see the [SQL binding overview](./functions-bindings-azure-sql.md).
22+
The Azure SQL trigger scaling decisions for the [Consumption and Premium plans](functions-scale.md) are done via target-based scaling. For more information, see [Target-based scaling](functions-target-based-scaling.md) and review the [Azure Functions hosting options](functions-scale.md).
2723

28-
The Azure SQL trigger scaling decisions for the Consumption and Premium plans are done via target-based scaling. For more information, see [Target-based scaling](functions-target-based-scaling.md).
24+
> [!NOTE]
25+
> Support for Consumption plans requires [release v3.1.284 or later](https://github.com/Azure/azure-functions-sql-extension/releases) of the [Azure SQL bindings for Azure Functions](functions-bindings-azure-sql.md).
26+
>
2927
3028
## Functionality Overview
3129

@@ -41,7 +39,7 @@ while (true) {
4139

4240
Changes are processed in the order that their changes were made, with the oldest changes being processed first. A couple notes about change processing:
4341

44-
1. If changes to multiple rows are made at once the exact order that they are sent to the function is based on the order returned by the CHANGETABLE function
42+
1. If changes to multiple rows are made at once the exact order that they’re sent to the function is based on the order returned by the CHANGETABLE function
4543
2. Changes are "batched" together for a row. If multiple changes are made to a row between each iteration of the loop then only a single change entry exists for that row which will show the difference between the last processed state and the current state
4644
3. If changes are made to a set of rows, and then another set of changes are made to half of those same rows, then the half of the rows that weren't changed a second time are processed first. This processing logic is due to the above note with the changes being batched - the trigger will only see the "last" change made and use that for the order it processes them in
4745

@@ -662,7 +660,7 @@ Note that these retries are outside the built-in idle connection retry logic tha
662660
### Function exception retries
663661
If an exception occurs in the user function when processing changes then the batch of rows currently being processed are retried again in 60 seconds. Other changes are processed as normal during this time, but the rows in the batch that caused the exception are ignored until the timeout period has elapsed.
664662
665-
If the function execution fails five times in a row for a given row then that row is completely ignored for all future changes. Because the rows in a batch are not deterministic, rows in a failed batch might end up in different batches in subsequent invocations. This means that not all rows in the failed batch will necessarily be ignored. If other rows in the batch were the ones causing the exception, the "good" rows might end up in a different batch that doesn't fail in future invocations.
663+
If the function execution fails five times in a row for a given row then that row is completely ignored for all future changes. Because the rows in a batch aren't deterministic, rows in a failed batch might end up in different batches in subsequent invocations. This means that not all rows in the failed batch will necessarily be ignored. If other rows in the batch were the ones causing the exception, the "good" rows might end up in a different batch that doesn't fail in future invocations.
666664
667665
## Next steps
668666

0 commit comments

Comments
 (0)