VOOZH about

URL: https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.Tables/

⇱ NuGet Gallery | Microsoft.Azure.WebJobs.Extensions.Tables 1.4.0




👁 Image
Microsoft.Azure.WebJobs.Extensions.Tables 1.4.0

Prefix Reserved
dotnet add package Microsoft.Azure.WebJobs.Extensions.Tables --version 1.4.0
 
 
NuGet\Install-Package Microsoft.Azure.WebJobs.Extensions.Tables -Version 1.4.0
 
 
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Tables" Version="1.4.0" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Microsoft.Azure.WebJobs.Extensions.Tables" Version="1.4.0" />
 
Directory.Packages.props
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Tables" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Microsoft.Azure.WebJobs.Extensions.Tables --version 1.4.0
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Microsoft.Azure.WebJobs.Extensions.Tables, 1.4.0"
 
 
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Microsoft.Azure.WebJobs.Extensions.Tables@1.4.0
 
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Microsoft.Azure.WebJobs.Extensions.Tables&version=1.4.0
 
Install as a Cake Addin
#tool nuget:?package=Microsoft.Azure.WebJobs.Extensions.Tables&version=1.4.0
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Azure WebJobs Tables client library for .NET

This extension provides functionality for accessing Azure Tables in Azure Functions.

Getting started

Install the package

Install the Tables extension with NuGet:

dotnet add package Microsoft.Azure.WebJobs.Extensions.Tables

Prerequisites

You need an Azure subscription and a Storage Account or Cosmos Tables Account to use this package.

Using Storage Tables

To create a new Storage Account, you can use the Azure Portal, Azure PowerShell, or the Azure CLI. Here's an example using the Azure CLI:

az storage account create --name <your-resource-name> --resource-group <your-resource-group-name> --location westus --sku Standard_LRS
Using Cosmos Tables

To create a new Cosmos Tables , you can use the Azure Portal, Azure PowerShell, or the Azure CLI.

Authenticate the client

Connection represents a set of information required to connect to a table service. It can contain a connection string, an endpoint, token credential or a shared key.

The Connection property of TableAttribute defines which connection is used for the Table Service access. For example, [Tables(Connection="MyTableService")] is going to use MyTableService connection.

The connection information can be set in local.settings.json or application settings in Azure portal.

When adding a setting to local.settings.json place it under the Values property:

{
 "IsEncrypted": false,
 "Values": {
 "MyTableService": "..."
 }
}

When adding a setting to application settings in Azure portal use the provided name directly:

MyTableService = ...

Tables extension uses the AzureWebJobsStorage connection name by default.

Connection string

To use connection strings authentication assign connection string value directly to the connection setting.

<ConnectionName> = DefaultEndpointsProtocol=https;AccountName=...;AccountKey=...;EndpointSuffix=core.windows.net

Using endpoint and token credential

NOTE: token credential authentication is supported only for storage tables.

<ConnectionName>__endpoint = https://...table.core.windows.net

If no credential information is provided the DefaultAzureCredential is used.

When using user-assigned manageed identity the clientId and credential settings need to be provided:

<ConnectionName>__credential = managedidentity

<ConnectionName>__clientId = <user-assigned client id>

Using shared key credential

When using shared key authentication the endpoint, accountKey and accountName need to be provided.

<ConnectionName>__endpoint = https://...table.core.windows.net

<ConnectionName>__credential__accountName = <account name>

<ConnectionName>__credential__accountKey = <account key>

Key concepts

The input binding allows you to read table as input to an Azure Function. The output binding allows you to modify and delete table rows in an Azure Function.

Please follow the input binding tutorial and output binding tutorial to learn about using this extension for accessing table service.

Examples

Tables extensions provides only bindings. Bindings by themselves can't trigger a function. It can only read or write entries to the table.

In the following example we use HTTP trigger to invoke the function.

Binding to a single entity

public class InputSingle
{
 [FunctionName("InputSingle")]
 public static void Run(
 [HttpTrigger(AuthorizationLevel.Anonymous, "GET")] HttpRequest request,
 [Table("MyTable", "<PartitionKey>", "<RowKey>")] TableEntity entity, ILogger log)
 {
 log.LogInformation($"PK={entity.PartitionKey}, RK={entity.RowKey}, Text={entity["Text"]}");
 }
}

Binding to a single entity using model type

public class MyEntity
{
 public string PartitionKey { get; set; }
 public string RowKey { get; set; }
 public string Text { get; set; }
}
public class InputSingleModel
{
 [FunctionName("InputSingleModel")]
 public static void Run(
 [HttpTrigger(AuthorizationLevel.Anonymous, "GET")] HttpRequest request,
 [Table("MyTable", "<PartitionKey>", "<RowKey>")] MyEntity entity, ILogger log)
 {
 log.LogInformation($"PK={entity.PartitionKey}, RK={entity.RowKey}, Text={entity.Text}");
 }
}

Binding to multiple entities with filter

public class InputMultipleEntitiesFilter
{
 [FunctionName("InputMultipleEntitiesFilter")]
 public static void Run(
 [HttpTrigger(AuthorizationLevel.Anonymous, "GET")] HttpRequest request,
 [Table("MyTable", "<PartitionKey>", Filter = "Text ne ''")] IEnumerable<TableEntity> entities, ILogger log)
 {
 foreach (var entity in entities)
 {
 log.LogInformation($"PK={entity.PartitionKey}, RK={entity.RowKey}, Text={entity["Text"]}");
 }
 }
}

Creating a single entity

public class OutputSingle
{
 [FunctionName("OutputSingle")]
 public static void Run(
 [HttpTrigger(AuthorizationLevel.Anonymous, "GET")] HttpRequest request,
 [Table("MyTable")] out TableEntity entity)
 {
 entity = new TableEntity("<PartitionKey>", "<RowKey>")
 {
 ["Text"] = "Hello"
 };
 }
}

Creating a single entity using model

public class MyEntity
{
 public string PartitionKey { get; set; }
 public string RowKey { get; set; }
 public string Text { get; set; }
}
public class OutputSingleModel
{
 [FunctionName("OutputSingleModel")]
 public static void Run(
 [HttpTrigger(AuthorizationLevel.Anonymous, "GET")] HttpRequest request,
 [Table("MyTable")] out MyEntity entity)
 {
 entity = new MyEntity()
 {
 PartitionKey = "<PartitionKey>",
 RowKey = "<RowKey>",
 Text = "Hello"
 };
 }
}

Creating multiple entities

public class OutputMultiple
{
 [FunctionName("OutputMultiple")]
 public static void Run(
 [HttpTrigger(AuthorizationLevel.Anonymous, "POST")] HttpRequest request,
 [Table("MyTable")] IAsyncCollector<TableEntity> collector)
 {
 for (int i = 0; i < 10; i++)
 {
 collector.AddAsync(new TableEntity("<PartitionKey>", i.ToString())
 {
 ["Text"] = i.ToString()
 });
 }
 }
}

Creating multiple entities using model

public class MyEntity
{
 public string PartitionKey { get; set; }
 public string RowKey { get; set; }
 public string Text { get; set; }
}
public class OutputMultipleModel
{
 [FunctionName("OutputMultipleModel")]
 public static void Run(
 [HttpTrigger(AuthorizationLevel.Anonymous, "POST")] HttpRequest request,
 [Table("MyTable")] IAsyncCollector<MyEntity> collector)
 {
 for (int i = 0; i < 10; i++)
 {
 collector.AddAsync(new MyEntity()
 {
 PartitionKey = "<PartitionKey>",
 RowKey = i.ToString(),
 Text = i.ToString()
 });
 }
 }
}

Binding to SDK TableClient type

Use a TableClient method parameter to access the table by using the Azure Tables SDK.

public class BindTableClient
{
 [FunctionName("BindTableClient")]
 public static async Task Run(
 [HttpTrigger(AuthorizationLevel.Anonymous, "POST")] HttpRequest request,
 [Table("MyTable")] TableClient client)
 {
 await client.AddEntityAsync(new TableEntity("<PartitionKey>", "<RowKey>")
 {
 ["Text"] = request.GetEncodedPathAndQuery()
 });
 }
}

Troubleshooting

Please refer to Monitor Azure Functions for troubleshooting guidance.

Next steps

Read the introduction to Azure Function or creating an Azure Function guide.

Contributing

See the CONTRIBUTING.md for details on building, testing, and contributing to this library.

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit cla.microsoft.com.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact with any additional questions or comments.

Product Versions Compatible and additional computed target framework versions.
.NET net5.0 net5.0 was computed.  net5.0-windows net5.0-windows was computed.  net6.0 net6.0 was computed.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 was computed.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 is compatible.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
.NET Core netcoreapp2.0 netcoreapp2.0 was computed.  netcoreapp2.1 netcoreapp2.1 was computed.  netcoreapp2.2 netcoreapp2.2 was computed.  netcoreapp3.0 netcoreapp3.0 was computed.  netcoreapp3.1 netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 netstandard2.0 is compatible.  netstandard2.1 netstandard2.1 was computed. 
.NET Framework net461 net461 was computed.  net462 net462 was computed.  net463 net463 was computed.  net47 net47 was computed.  net471 net471 was computed.  net472 net472 was computed.  net48 net48 was computed.  net481 net481 was computed. 
MonoAndroid monoandroid monoandroid was computed. 
MonoMac monomac monomac was computed. 
MonoTouch monotouch monotouch was computed. 
Tizen tizen40 tizen40 was computed.  tizen60 tizen60 was computed. 
Xamarin.iOS xamarinios xamarinios was computed. 
Xamarin.Mac xamarinmac xamarinmac was computed. 
Xamarin.TVOS xamarintvos xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Microsoft.Azure.WebJobs.Extensions.Tables:

Package Downloads
FunctionMonkey.Cgo

Package Description

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on Microsoft.Azure.WebJobs.Extensions.Tables:

Repository Stars
Azure/azure-functions-host
The host/runtime that powers Azure Functions
Version Downloads Last Updated
1.4.0 136,128 6/20/2025
1.3.3 85,085 3/14/2025
1.3.2 428,127 6/13/2024
1.3.1 38,988 4/17/2024
1.2.1 242,345 11/13/2023
1.2.0 147,896 8/11/2023
1.2.0-beta.1 6,174 5/23/2023
1.1.0 236,140 3/13/2023
1.0.0 700,797 4/12/2022
1.0.0-beta.2 5,080 3/10/2022
1.0.0-beta.1 30,712 1/14/2022