Skip to content

Commit 76f0129

Browse files
Add output binding order note to known issues (#551)
1 parent c9affd2 commit 76f0129

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
- [Introduction](#introduction)
99
- [Supported SQL Server Versions](#supported-sql-server-versions)
1010
- [Known Issues](#known-issues)
11+
- [Output Bindings](#output-bindings)
12+
- [Input Bindings](#input-bindings)
13+
- [Trigger Bindings](#trigger-bindings)
1114
- [Telemetry](#telemetry)
1215
- [Trademarks](#trademarks)
1316

@@ -40,9 +43,20 @@ Databases on SQL Server, Azure SQL Database, or Azure SQL Managed Instance which
4043

4144
## Known Issues
4245

46+
### Output Bindings
4347
- Output bindings against tables with columns of data types `NTEXT`, `TEXT`, or `IMAGE` are not supported and data upserts will fail. These types [will be removed](https://docs.microsoft.com/sql/t-sql/data-types/ntext-text-and-image-transact-sql) in a future version of SQL Server and are not compatible with the `OPENJSON` function used by this Azure Functions binding.
48+
- Output bindings execution order is not deterministic ([azure-webjobs-sdk#1025](https://github.com/Azure/azure-webjobs-sdk/issues/1025)) and so the order that data is upserted is not guaranteed. This can be problematic if, for example, you upsert rows to two separate tables with one having a foreign key reference to another. The upsert will fail if the dependent table does its upsert first.
49+
50+
Some options for working around this :
51+
* Have multiple functions, with dependent functions being triggered by the initial functions (through a trigger binding or other such method)
52+
* Use [dynamic (imperative)](https://learn.microsoft.com/azure/azure-functions/functions-bindings-expressions-patterns#binding-at-runtime) bindings (.NET only)
53+
* Use [IAsyncCollector](https://learn.microsoft.com/azure/azure-functions/functions-dotnet-class-library?tabs=v2%2Ccmd#writing-multiple-output-values) and call `FlushAsync` in the order desired (.NET only)
54+
55+
### Input Bindings
4456
- Input bindings against tables with columns of data types 'DATETIME', 'DATETIME2', or 'SMALLDATETIME' will assume that the values are in UTC format.
4557
- For Java Functions using Output bindings against a table with columns of data types 'DATETIME', 'DATETIME2', or 'SMALLDATETIME', use java.util.Date type to ensure the datetime is formatted correctly.
58+
59+
### Trigger Bindings
4660
- Trigger bindings will exhibit undefined behavior if the SQL table schema gets modified while the user application is running, for example, if a column is added, renamed or deleted or if the primary key is modified or deleted. In such cases, restarting the application should help resolve any errors.
4761

4862
## Telemetry

0 commit comments

Comments
 (0)