.alter database policy ingestionbatching command

Applies to: ✅ Microsoft FabricAzure Data Explorer

Sets the ingestion batching policy to determine when data aggregation stops and a batch is sealed and ingested. The ingestion batching policy applies to queued ingestion.

When setting the policy for a database, it applies for all its tables, except tables that were set with their own ingestion batching policy. If the policy isn't set for a database, the default values apply.

Permissions

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

Defaults and limits

See defaults and limits.

Syntax

.alter database DatabaseName policy ingestionbatching PolicyObject

Learn more about syntax conventions.

Parameters

Name Type Required Description
DatabaseName string ✔️ The name of the database for which to alter the ingestion batching policy.
PolicyObject string ✔️ A policy object that defines the ingestion batching policy. For more information, see ingestion batching policy.

Example

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

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

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.