Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to: ✅ Microsoft Fabric ✅ Azure Data Explorer
Alters the query acceleration policy of a specific external delta table.
For limitations, see Limitations.
Permissions
You must have at least Database Admin permissions to run this command.
Syntax
.alter external table ExternalTableName policy query_acceleration 'JSON-serialized policy'
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| ExternalTableName | string |
✔️ | The name of the external delta table. |
| JSON-serialized policy | string |
✔️ | String literal holding a JSON property bag. |
JSON property bag
| Property | Type | Required | Description |
|---|---|---|---|
| IsEnabled | Boolean |
✔️ | Indicates whether the policy is enabled. |
| Hot | Timespan |
✔️ | The hot period defined in the query acceleration policy. Minimum value = 1 d. |
| HotWindows | DateTime |
One or more optional time windows. Delta data files created within these time windows are accelerated. | |
| MaxAge | Timespan |
The external table returns accelerated data if the last index refresh time is greater than @now - MaxAge. Otherwise, the external table operates in non-accelerated mode. Default is 5 minutes. Minimum is 1 minute. This property can also be overridden at query time by using the external_table() function's MaxAgeOverride parameter. |
|
| HotDateTimeColumn | String |
Optional. The name of a datetime column in the Delta table whose values will be used to determine hot-cache eligibility. When set, data files whose rows have values within the configured Hot period (and/or HotWindows) are selected for caching. |
| Property | Type | Required | Description |
|---|---|---|---|
| IsEnabled | Boolean |
✔️ | Indicates whether the policy is enabled. |
| Hot | Timespan |
✔️ | The hot period defined in the query acceleration policy. Minimum value = 1 d. |
| HotWindows | DateTime |
One or more optional time windows. Delta data files created within these time windows are accelerated. | |
| MaxAge | Timespan |
The external table returns accelerated data if the last index refresh time is greater than @now - MaxAge. Otherwise, the external table operates in non-accelerated mode. Default is 5 minutes. Minimum is 1 minute. This property can also be overridden at query time by using the external_table() function's MaxAgeOverride parameter. |
|
| ManagedIdentity | string |
Optional managed identity for which the query acceleration background operations are executed. This identity must have relevant delta table permissions and must be enabled for AutomatedFlows in the cluster / database managed identity policy. For more information, see Managed identities overview. | |
| HotDateTimeColumn | String |
Optional. The name of a datetime column in the Delta table whose values will be used to determine hot-cache eligibility. When set, data files whose rows have values within the configured Hot period (and/or HotWindows) are selected for caching. |
Note
Query acceleration is applied to data within a specific time period, based on the modificationTime as stated for each file in the delta log by default. You can override the default behavior, by specifying the HotDateTimeColumn property in the policy.
Example
{ "IsEnabled": true, "Hot": "1.00:00:00" }
Returns
The command returns a table with one record that includes the modified policy object.
| Column | Type | Description |
|---|---|---|
| PolicyName | string |
The name of the policy - QueryAcceleration |
| EntityName | string |
The fully qualified name of the entity: [DatabaseName].[ExternalTableName] |
| Policy | string |
A JSON-serialization of the query acceleration policy that is set on the external delta table |
| ChildEntities | string |
The child entities this policy affects - null |
| EntityType | string |
The type of the entity the policy applies to - ExternalTable |
Example
.alter external table MyExternalTable policy query_acceleration '{"IsEnabled": true, "Hot": "1.00:00:00", "HotWindows":[{"MinValue":"2025-07-07 07:00:00","MaxValue":"2025-07-09 07:00:00"}], "MaxAge": "00:05:00", "HotDateTimeColumn":"dt1"}'
.alter external table MyExternalTable policy query_acceleration '{"IsEnabled": true, "Hot": "1.00:00:00", "HotWindows":[{"MinValue":"2025-07-07 07:00:00","MaxValue":"2025-07-09 07:00:00"}], "MaxAge": "00:05:00", "ManagedIdentity": "12345678-1234-1234-1234-1234567890ab", "HotDateTimeColumn":"dt1"}'