0

Approach 1

Created an ADX activity in ADF, and in the command field, I wrote the purge command (which I copied from Azure Docs): .purge table MyTable in database DBName allrecords

I tried running the purge command but it keeps returning syntax error: BadRequest_SyntaxError: Request is invalid and cannot be executed

Approach 2

Created a Web Activity in ADF, where I used a Linked Service, and set the following config:

Base URL as the URI of the Kusto cluster: https://<clusterName>.<region>.kusto.windows.net Authentication: System Assigned Managed Identity
Resource: https://<clusterName>.<region>.kusto.windows.net (URI of the Kusto cluster)
Relative URL: v1/rest/mgmt
Method: POST
Body:

{
    "db": "DBName",
    "csl": ".purge table MyTable in database DBName allrecords"
}

But it also returns the same error: BadRequest_SyntaxError: Request is invalid and cannot be executed

The user/role has Admin privileges to the cluster and Purge is enabled from the ADX Config.

Note that I'm not using the ingest- endpoint here to run purge because I couldn't get it to work and there isn't info available in the docs as to where to put the ingest- endpoint URL.

1 Answer 1

0

it sounds like you're using the wrong URL/endpoint - as mentioned in the documentation: "Purge execution is invoked by running purge table TableName records command on the Data Management endpoint https://ingest-[YourClusterName].[Region].kusto.windows.net."

Sign up to request clarification or add additional context in comments.

3 Comments

How exactly does it work? There is no way to configure that in ADX Activity. And for that to work in Web Activity in ADF, where do I need to put the ingest endpoint? In the base URL? What should be the relative URL?
if the tool you've chosen (e.g., ADF) doesn't allow you to configure/execute the flow you need to (e.g., cause it only supports a specific type of endpoint which isn't the one you need), then you should consider using a different tool (examples are provided here, for instance Power Apps, Power Automate, Azure Functions, Logic Apps)
As I said, I tried to use Web Activity which technically should support this. But it's still giving the same error

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.