Skip to content
cloudemu
Services

§ Documentation

Table Storage

In-memory Azure Table Storage data plane — tables and entities, driven with the real aztables SDK

azr TableStorage

Emulates the data plane of Azure Table Storage — the OData REST API that creates tables and inserts, reads, updates, deletes, and queries entities keyed by partition and row key. It has its own driver rather than reusing the NoSQL database driver, because Table Storage's (PartitionKey, RowKey) addressing and OData query filters are its own shape. You write entities as property bags and read them back exactly as the real service returns them.

Reach for it when your code stores or queries entities in Table Storage — a session store, a lookup table, a lightweight event log — without a real (billed) storage account. Served as the Azure Table Storage REST API, so a real github.com/Azure/azure-sdk-for-go/sdk/data/aztables client with a custom endpoint works unchanged.

ProviderServiceSDK-compatDriver
AzureTable Storage (data plane)✓ Liveazure.TableStorage

Drive it with the real SDK#

Run cloudemu as a server, then point the stock aztables client at it — only the endpoint changes. Start it with cloudemu serve (or docker run --rm -p 4568:4568 ghcr.io/stackshy/cloudemu), which serves the Azure API on https://localhost:4568 (self-signed TLS):

cloudemu serve   # Azure API on https://localhost:4568 (self-signed TLS)

Point the aztables client at https://localhost:4568. cloudemu accepts any credentials, so a no-credential client is enough:

// aztables client, pointed at https://localhost:4568
//   svc := aztables.NewServiceClientWithNoCredential("https://localhost:4568", opts)
//   table := svc.NewClient("events")
//   table.AddEntity(ctx, marshalledEntity, nil)

See the SDK-Compat Server page for the Azure TLS setup.

In-process (Go unit tests)#

For Go unit tests written inside cloudemu-aware code, stand the same wire server up in-process with httptest.NewTLSServer and point the client at ts.URL. The Drivers you pass name exactly the drivers this service needs:

import (
    "github.com/stackshy/cloudemu/v2"
    azureserver "github.com/stackshy/cloudemu/v2/server/azure"
)

cloud := cloudemu.NewAzure()
ts := httptest.NewTLSServer(azureserver.New(azureserver.Drivers{
    TableStorage: cloud.TableStorage,
}))
defer ts.Close()
// point the same aztables client at ts.URL instead of the running endpoint (use ts.Client() for the test cert)

Call the driver directly#

For in-process setup or assertions you can skip the HTTP hop and call the driver:

import tsdriver "github.com/stackshy/cloudemu/v2/services/tablestorage/driver"

azure.TableStorage.CreateTable(ctx, "events")

azure.TableStorage.InsertEntity(ctx, "events", "2026-08", "evt-001", tsdriver.Entity{
    "kind":  "signup",
    "email": "a@example.com",
})

got, _ := azure.TableStorage.GetEntity(ctx, "events", "2026-08", "evt-001")

page, _ := azure.TableStorage.QueryEntities(ctx, "events", tsdriver.QueryOptions{
    Filter: "PartitionKey eq '2026-08'",
})

UpdateEntity and DeleteEntity round out the CRUD set, and ListTables enumerates the tables you've created.

Behavior & fidelity#

BehaviorWhat happens
Partition + row key addressingEvery entity is uniquely addressed by (PartitionKey, RowKey); inserting a duplicate errors, and reads target one entity exactly.
Property bagsEntities are open sets of typed properties — you store whatever fields you like and read them back unchanged.
OData query filtersQueryEntities applies OData $filter expressions (e.g. PartitionKey eq '…') and pages results deterministically.
Tables are namespacesTables must exist before entity writes and must be created and deleted explicitly.
Wire fidelityResponses are the Table Storage OData JSON the SDK's deserializer expects, so aztables decodes them without changes.

SDK-compat — Live#

Real aztables clients drive it end-to-end against the Azure Table Storage REST API — see SDK-Compat for the full Azure quick start.

On this page

On this page