Édition

Partage via


.alter table policy ingestionbatching command

Applies to: ✅ Microsoft FabricAzure Data Explorer

Sets the table's ingestion batching policy to determine when data aggregation stops and a batch is sealed and ingested.

If the policy isn't set for a table, the database-level policy applies. If it isn't set as well, the default values apply.

Permissions

You must have at least Table Admin permissions to run this command.

Defaults and limits

See defaults and limits.

Syntax

.alter table [ DatabaseName.]TableName policy ingestionbatching PolicyObject

.alter tables (Table1 , Table2 [,...]) policy ingestionbatching PolicyObject

Learn more about syntax conventions.

Parameters

Name Type Required Description
TableName string ✔️ The name of the table to alter.
DatabaseName string The name of the database. When you run the command from the database context that contains the table to alter, DatabaseName is not required.
PolicyObject string ✔️ A serialized JSON policy object. See ingestion batching policy.

Examples

The following command sets a batch ingress data time of 30 seconds, for 500 files, or 1 GB, whichever comes first.

.alter table MyDatabase.MyTable policy ingestionbatching
```
{
    "MaximumBatchingTimeSpan" : "00:00:30",
    "MaximumNumberOfItems" : 500,
    "MaximumRawDataSizeMB": 1024
}
```

The following command sets a batch ingress data time of 1 minute, for 20 files, or 300 MB, whichever comes first.

.alter tables (MyTable1, MyTable2, MyTable3) policy ingestionbatching
```
{
    "MaximumBatchingTimeSpan" : "00:01:00",
    "MaximumNumberOfItems" : 20,
    "MaximumRawDataSizeMB": 300
}
```

Note

If you don't specify all parameters of a PolicyObject, the unspecified parameters will be set to default values. For example, specifying only "MaximumBatchingTimeSpan" will result in "MaximumNumberOfItems" and "MaximumRawDataSizeMB" being set to default. To override only some parameters, use the alter-merge command command.