Azure Tables bindings for Azure Functions
Azure Functions integrates with Azure Tables via triggers and bindings. Integrating with Azure Tables allows you to build functions that read and write data using Azure Cosmos DB for Table and Azure Table Storage.
Action | Type |
---|---|
Read table data in a function | Input binding |
Allow a function to write table data | Output binding |
Install extension
The extension NuGet package you install depends on the C# mode you're using in your function app:
Functions execute in the same process as the Functions host. To learn more, see Develop C# class library functions using Azure Functions.
The process for installing the extension varies depending on the extension version:
This version introduces the ability to connect using an identity instead of a secret. For a tutorial on configuring your function apps with managed identities, see the creating a function app with identity-based connections tutorial.
This version allows you to bind to types from Azure.Data.Tables
. It also introduces the ability to use Azure Cosmos DB for Table.
This extension is available by installing the Microsoft.Azure.WebJobs.Extensions.Tables NuGet package into a project using version 5.x or higher of the extensions for blobs and queues.
Using the .NET CLI:
# Install the Azure Tables extension
dotnet add package Microsoft.Azure.WebJobs.Extensions.Tables --version 1.0.0
# Update the combined Azure Storage extension (to a version which no longer includes Azure Tables)
dotnet add package Microsoft.Azure.WebJobs.Extensions.Storage --version 5.0.0
Note
Azure Blobs, Azure Queues, and Azure Tables now use separate extensions and are referenced individually. For example, to use the triggers and bindings for all three services in your .NET in-process app, you should add the following packages to your project:
- Microsoft.Azure.WebJobs.Extensions.Storage.Blobs
- Microsoft.Azure.WebJobs.Extensions.Storage.Queues
- Microsoft.Azure.WebJobs.Extensions.Tables
Previously, the extensions shipped together as Microsoft.Azure.WebJobs.Extensions.Storage, version 4.x. This same package also has a 5.x version, which references the split packages for blobs and queues only. When upgrading your package references from older versions, you may therefore need to additionally reference the new Microsoft.Azure.WebJobs.Extensions.Tables NuGet package. Also, when referencing these newer split packages, make sure you are not referencing an older version of the combined storage package, as this will result in conflicts from two definitions of the same bindings.
Install bundle
The Azure Tables bindings are part of an extension bundle, which is specified in your host.json project file. You may need to modify this bundle to change the version of the bindings, or if bundles aren't already installed. To learn more, see extension bundle.
This version introduces the ability to connect using an identity instead of a secret. For a tutorial on configuring your function apps with managed identities, see the creating a function app with identity-based connections tutorial.
You can add this version of the extension from the extension bundle v3 by adding or replacing the following code in your host.json
file:
{
"version": "2.0",
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[3.3.0, 4.0.0)"
}
}
Next steps
Feedback
Submit and view feedback for