Search code examples
azure-functionsazure-table-storageazure-storage-emulatorazurite

Does azurite support CloudTable?


Does azurite mac support local emulation of CloudTable? azurite works fine for an EventGridTrigger but not CloudTable.

using an azure function to work with azure storage:

[FunctionName("...")]
public static async Task<IActionResult> Run(
            [HttpTrigger ...,
            [Table("Name", "PK", "RK")] ...,
            [Table("Name")] CloudTable tableOut)

and running azurite before starting the function in Visual Studio For Mac:

azurite -s -l /tmp/azurite -d /tmp/azurite/debug.log

the function fails to start with the error:

Microsoft.Azure.WebJobs.Extensions.Storage: Can't bind Table to type 'Microsoft.WindowsAzure.Storage.Table.CloudTable

Solution

  • CloudTable works and Azurite table service is now in preview, starting with version 3.12.00: https://github.com/Azure/Azurite/releases/tag/v3.12.0

    A nice way to avoid cluttering your repositories with annoying Azurite files is to run Azurite in a docker container (see https://github.com/Azure/Azurite#DockerHub).

    docker run -p 10000:10000 -p 10001:10001 -p 10002:10002 mcr.microsoft.com/azure-storage/azurite