Azure Table Storage
Azure Table Storage is a NoSQL key-value store that offers highly scalable, cost-effective storage for structured data. This guide covers how to configure and use Azure Table Storage as a Cloud Replicator destination.
Overview
Azure Table Storage stores data in tables with a PartitionKey and RowKey structure. Cloud Replicator maps Business Central data to this structure:
| Table Storage Concept | Business Central Mapping |
|---|---|
| Table | Business Central table name (sanitized) |
| PartitionKey | Company name + optional postfix |
| RowKey | Primary key field(s) or SystemId |
| Properties | Field values |
Prerequisites
Before configuring Azure Table Storage:
- Azure Subscription: Active Azure subscription
- Storage Account: General-purpose v2 storage account created
- Access Key: Storage account access key available
Creating an Azure Storage Account
If you don't have a storage account:
Step 1: Create Storage Account in Azure Portal
- Sign in to the Azure Portal (https://portal.azure.com)
- Click "Create a resource"
- Search for "Storage account" and select it
- Click "Create"
Step 2: Configure Basic Settings
| Setting | Recommended Value |
|---|---|
| Subscription | Your subscription |
| Resource group | Create new or use existing |
| Storage account name | Unique name (lowercase, alphanumeric) |
| Region | Same region as your Business Central |
| Performance | Standard |
| Redundancy | LRS (or higher based on requirements) |
Step 3: Complete Creation
- Click "Review + create"
- Review settings and click "Create"
- Wait for deployment to complete
Step 4: Get Access Key
- Navigate to your storage account
- Go to "Access keys" under Security + networking
- Copy one of the access keys (key1 or key2)
Configuring Cloud Replicator
Setup Steps
- Search for "Cloud Replicator Setup" in Business Central
- Locate the Azure Table Storage section
- Enter the following:
| Field | Value |
|---|---|
| Storage Account Name | Your storage account name |
| Storage Account Access Key | The access key copied from Azure |
Testing the Connection
After entering credentials:
- Create a table mapping for a small table
- Select "Azure Table" as the destination
- Run a manual replication
- Check the Replication Log for success
- Verify data in Azure Portal > Storage Account > Tables
Data Structure in Azure Table Storage
Table Names
Business Central table names are sanitized for Azure Table Storage compatibility:
- Spaces and special characters are removed (Azure Table names may contain only letters and digits)
- Table names starting with a number are prefixed with "T"
- Maximum 63 characters
Example: "Sales Header" becomes "SalesHeader"
Partition Keys
The PartitionKey is constructed from:
- Company name (with excluded characters replaced)
- Optional partition key postfix (configured in setup)
- Optional additional partition key field (configured per table)
Example: CRONUS_International_Ltd_
Row Keys
The RowKey is constructed from:
- The primary key field values concatenated together (special characters such as spaces and dashes are replaced with underscores)
- OR SystemId GUID if "SystemId as RowKey" is enabled
Example: SO_001234 or a1b2c3d4-e5f6-7890-abcd-ef1234567890
Properties
Each Business Central field becomes a property in the table entity:
- Field names are sanitized (special characters replaced)
- Data types are mapped to OData types
- System fields are included (SystemCreatedAt, SystemModifiedAt, etc.)
Series Tables (Per Day)
When "Per Day" is enabled for a table mapping, Cloud Replicator creates a separate "Series" table:
| Table | Purpose |
|---|---|
| SalesHeader | Current state of records |
| SalesHeaderSeries | Daily snapshots with date suffix |
This is useful for:
- Time-series analysis
- Historical trend tracking
- Point-in-time reporting
Querying Data
Azure Portal
- Navigate to Storage Account > Tables
- Select your table
- Use the query editor to filter and view data
Azure Storage Explorer
- Download Azure Storage Explorer
- Connect using your storage account credentials
- Browse and query tables with a rich UI
Code Access
Use Azure SDK for your preferred language:
// C# Example
TableClient tableClient = new TableClient(connectionString, "Customers");
var customers = tableClient.Query<TableEntity>(
filter: $"PartitionKey eq 'CRONUS_International'"
);
Performance Optimization
Partition Strategy
Cloud Replicator uses company name as the partition key by default. This provides:
- Good distribution for multi-company scenarios
- Efficient queries within a single company
- Isolation between companies
For additional partitioning, use the "Additional Partition Key Field" option.
Query Patterns
For best performance:
- Always include PartitionKey in queries
- Include RowKey for point queries
- Avoid table scans (queries without PartitionKey)
Throughput Limits
Azure Table Storage has per-partition and per-account limits:
- Single partition: 2,000 entities/second
- Storage account: 20,000 entities/second
For higher throughput, consider Cosmos DB Table API.
Cost Management
Understanding Costs
Azure Table Storage costs include:
- Storage: Per GB stored per month
- Transactions: Per 10,000 transactions
- Data transfer: Outbound data beyond free tier
Cost Optimization Tips
- Enable "Per Day" only when historical tracking is needed
- Exclude unnecessary fields using Field Actions
- Clean up old series data periodically in Azure
Troubleshooting
Connection Refused
- Verify storage account name is correct
- Check access key is valid (regenerate if needed)
- Ensure storage account firewall allows Business Central access
Table Not Found
- Run replication again - tables are created automatically
- Check the Replication Log for specific errors
- Verify the table mapping is configured correctly
Throttling (429 Errors)
- Reduce number of replication engines
- Increase retry delay in setup
- Consider upgrading to Cosmos DB Table API
Invalid Characters
- Cloud Replicator sanitizes names automatically
- Check the "Exclude Characters from Company" setting
- Review field actions for problematic fields
Security Best Practices
Access Key Management
- Rotate access keys periodically
- Use the secondary key, allowing you to rotate primary without downtime
- Consider using Azure Key Vault for production environments
Network Security
- Enable firewall rules on storage account
- Use private endpoints for enhanced security
- Limit access to specific IP ranges
Data Security
- Enable "Secure transfer required" on storage account
- Consider enabling customer-managed encryption keys
- Review what data is being replicated