.alter-merge table policy sharding command
Applies to: ✅ Azure Data Explorer
Changes the table sharding policy. Use the sharding policy to manage data sharding for databases and tables.
The sharding policy defines if and how Extents (data shards) in your cluster should be sealed. When a database is created, it contains the default data sharding policy. This policy is inherited by all tables created in the database (unless the policy is explicitly overridden at the table level).
Permissions
You must have at least Table Admin permissions to run this command.
Syntax
.alter-merge
table
TableName policy
sharding
PolicyObject
Learn more about syntax conventions.
Parameters
Name | Type | Required | Description |
---|---|---|---|
TableName | string |
✔️ | The name of the table. |
PolicyObject | string |
✔️ | A serialized array of one or more JSON policy objects. For more information, see sharding policy. |
Returns
Returns a JSON representation of the policy.
Example
The following command changes a single property for the sharding policy for a table:
.alter-merge table MyTable policy sharding
@'{ "MaxExtentSizeInMb": 1024}'