Skip to content

Commit 0360e7e

Browse files
Update functions-bindings-azure-sql-trigger.md
1 parent 89c4a71 commit 0360e7e

File tree

1 file changed

+68
-7
lines changed

1 file changed

+68
-7
lines changed

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

Lines changed: 68 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.custom:
99
- devx-track-js
1010
- devx-track-python
1111
- ignite-2023
12-
ms.date: 6/20/2024
12+
ms.date: 6/24/2024
1313
ms.author: bspendolini
1414
ms.reviewer: glenga
1515
zone_pivot_groups: programming-languages-set-functions-lang-workers
@@ -539,15 +539,76 @@ The following table explains the binding configuration properties that you set i
539539

540540
## Optional Configuration
541541

542-
The following optional settings can be configured for the SQL trigger:
542+
The following optional settings can be configured for the SQL trigger for local development or for cloud deployments.
543+
544+
### host.json
543545

544546
[!INCLUDE [app settings to local.settings.json](../../includes/functions-host-json-section-intro.md)]
545547

546-
| Setting | Description|
547-
|---------|---------|
548-
|**Sql_Trigger_BatchSize** |The maximum number of changes processed with each iteration of the trigger loop before being sent to the triggered function. The default value is 100.|
549-
|**Sql_Trigger_PollingIntervalMs**|The delay in milliseconds between processing each batch of changes. The default value is 1000 (1 second).|
550-
|**Sql_Trigger_MaxChangesPerWorker**|The upper limit on the number of pending changes in the user table that are allowed per application-worker. If the count of changes exceeds this limit, it might result in a scale-out. The setting only applies for Azure Function Apps with [runtime driven scaling enabled](#enable-runtime-driven-scaling). The default value is 1000.|
548+
| Setting | Default| Description|
549+
|---------|---------|---------|
550+
|**MaxBatchSize** | 100 |The maximum number of changes processed with each iteration of the trigger loop before being sent to the triggered function.|
551+
|**PollingIntervalMs**| 1000 (1 second) | The delay in milliseconds between processing each batch of changes.|
552+
|**MaxChangesPerWorker**| 1000 | The upper limit on the number of pending changes in the user table that are allowed per application-worker. If the count of changes exceeds this limit, it might result in a scale-out. The setting only applies for Azure Function Apps with [runtime driven scaling enabled](#enable-runtime-driven-scaling).|
553+
554+
#### Example host.json file
555+
556+
Here is an example host.json file with the optional settings:
557+
558+
```JSON
559+
{
560+
"version": "2.0",
561+
"extensions": {
562+
"Sql": {
563+
"MaxBatchSize": 300,
564+
"PollingIntervalMs": 1000,
565+
"MaxChangesPerWorker": 100
566+
}
567+
},
568+
"logging": {
569+
"applicationInsights": {
570+
"samplingSettings": {
571+
"isEnabled": true,
572+
"excludedTypes": "Request"
573+
}
574+
},
575+
"logLevel": {
576+
"default": "Trace"
577+
}
578+
}
579+
}
580+
```
581+
582+
### local.setting.json
583+
584+
The local.settings.json file stores app settings and settings used by local development tools. Settings in the local.settings.json file are used only when you're running your project locally. When you publish your project to Azure, be sure to also add any required settings to the app settings for the function app.
585+
586+
> [!IMPORTANT]
587+
> Because the local.settings.json may contain secrets, such as connection strings, you should never store it in a remote repository. Tools that support Functions provide ways to synchronize settings in the local.settings.json file with the [app settings](functions-how-to-use-azure-function-app-settings.md#settings) in the function app to which your project is deployed.
588+
589+
| Setting | Default| Description|
590+
|---------|---------|---------|
591+
|**Sql_Trigger_BatchSize** | 100 |The maximum number of changes processed with each iteration of the trigger loop before being sent to the triggered function.|
592+
|**Sql_Trigger_PollingIntervalMs**| 1000 (1 second) | The delay in milliseconds between processing each batch of changes.|
593+
|**Sql_Trigger_MaxChangesPerWorker**| 1000 | The upper limit on the number of pending changes in the user table that are allowed per application-worker. If the count of changes exceeds this limit, it might result in a scale-out. The setting only applies for Azure Function Apps with [runtime driven scaling enabled](#enable-runtime-driven-scaling).|
594+
595+
#### Example local.settings.json file
596+
597+
Here is an example local.settings.json file with the optional settings:
598+
599+
```JSON
600+
{
601+
"IsEncrypted": false,
602+
"Values": {
603+
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
604+
"FUNCTIONS_WORKER_RUNTIME": "dotnet",
605+
"SqlConnectionString": "",
606+
"Sql_Trigger_MaxBatchSize": 300,
607+
"Sql_Trigger_PollingIntervalMs": 1000,
608+
"Sql_Trigger_MaxChangesPerWorker": 100
609+
}
610+
}
611+
```
551612

552613
## Set up change tracking (required)
553614

0 commit comments

Comments
 (0)