Reputation: 405
Is there any way to delete an Azure Table Storage entry/entries using Azure Functions API? The only two operations that can be easily performed on table from Azure Functions binding are read and write, using ICollector<T>
interface. I would like to schedule periodic cleanup of a table using a function triggered by a timer.
Upvotes: 1
Views: 1960
Reputation: 27835
Is there any way to delete an Azure Table Storage entry/entries using Azure Functions API? The only two operations that can be easily performed on table from Azure Functions binding are read and write, using ICollector interface.
As you said, storage tables binding scenarios in Azure function are reading row(s) and writing one or more rows, if you’d like to delete entity in Azure function, you could try to reference "Microsoft.WindowsAzure.Storage" and import namespaces.
#r "Microsoft.WindowsAzure.Storage"
using System;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Table;
and then you could write C# code to retrieve the entity and delete it from Azure table storage.
Upvotes: 4