Azure / azure-kusto-trender

A JavaScript client for Kusto (Azure Data Explorer, Synapse Data Explorer, Kusto free), featuring components for making calls directly to Kusto, rendering results from the API, and more
https://aka.ms/kusto.trender
MIT License
29 stars 11 forks source link

Error: Command is not enabled in the current deployment mode. #33

Closed hfleitas closed 1 year ago

hfleitas commented 1 year ago

Error: Command is not enabled in the current deployment mode.

File: https://github.com/Azure/azure-kusto-trender/blob/master/kusto/trender-schema.kql Line 11 is not compatible with ADX Free Clusters.

.alter tables (Timeseries, TimeseriesHierarchy, TimeseriesMetadata) policy caching hot = 3650d CommandType: CachingPolicyAlter Result: Failed Reason: Command is not enabled in the current deployment mode.

Breaks schema deploy midway and UDF functions do not get created.

Recommend commenting out line 11 till error handling can be implemented for free clusters.

hfleitas commented 1 year ago

Full error:

Error 

 Forbidden (403-Forbidden): {
    "error": {
        "code": "Forbidden",
        "message": "Caller is not authorized to perform this action",
        "@type": "Kusto.Common.Svc.Exceptions.CommandNotEnabledException",
        "@message": "Command is not enabled in the current deployment mode.",
        "@context": {
            "timestamp": "2022-11-05T14:29:25.0302714Z",
            "serviceAlias": "KVCHOSTERNORTHAMERICA0.KVC43F0EE6600E24EF2B0E",
            "machineName": "KENGINE00002C",
            "processName": "Kusto.Engine",
            "processId": 7936,
            "threadId": 14480,
            "clientRequestId": "KustoWebV2;a21151b0-ec52-4394-b673-92696e455f2d",
            "activityId": "b56e9dca-7c5b-4d40-b03c-faba9ec6d43d",
            "subActivityId": "b41b0d44-65b6-4bc6-b2b3-b25bfe2e6afb",
            "activityType": "DN.FE.ExecuteControlCommand",
            "parentActivityId": "e355c386-b8aa-4f3a-8e2f-48853d823875",
            "activityStack": "(Activity stack: CRID=KustoWebV2;a21151b0-ec52-4394-b673-92696e455f2d ARID=b56e9dca-7c5b-4d40-b03c-faba9ec6d43d > GW.Http.CallContext/b56e9dca-7c5b-4d40-b03c-faba9ec6d43d > GW.ExecuteQuery/f84ef864-950f-47fb-b8e4-37193fa06a77 > DN.Admin.Client.ExecuteControlCommand/e355c386-b8aa-4f3a-8e2f-48853d823875 > DN.FE.ExecuteControlCommand/b41b0d44-65b6-4bc6-b2b3-b25bfe2e6afb)"
        },
        "@permanent": true
    }
}. This normally represents a permanent error, and retrying is unlikely to help.
Error details:
DataSource='http://127.0.0.2:25125/v1/rest/mgmt',
DatabaseName='Trender2',
ClientRequestId='KustoWebV2;a21151b0-ec52-4394-b673-92696e455f2d',
ActivityId='b56e9dca-7c5b-4d40-b03c-faba9ec6d43d,
Timestamp='2022-11-05T14:29:25.0302714Z'.

 clientRequestId: KustoWebV2;a21151b0-ec52-4394-b673-92696e455f2d
cosh commented 1 year ago

thx!