how to delete a table in azure data explorer using kql query?

PRIYANKA S NAIR 40 Reputation points
2023-11-24T12:40:50.0566667+00:00

I was trying to delete a table called Heartbeat from Azure Data Explorer DB using a KQL script. The contents of the kql script is:

.drop table Heartbeat ifexists

On executing the kql script using github workflows, Im getting the following error:

The resource write operation failed to complete successfully, because it reached terminal provisioning state 'Failed'.","details":[{"code":"ScriptContainsUnsupportedCommand","message":"[BadRequest] The provided script contains unsupported commands that starts with [.drop]. Script's commands must start with one of the following verbs: '.create, .create-or-alter, .create-merge, .alter, .alter-merge, .enable, .add'"}]}]}}

Please suggest how to proceed further.

Thanks in Advance.

Azure Data Explorer
Azure Data Explorer
An Azure data analytics service for real-time analysis on large volumes of data streaming from sources including applications, websites, and internet of things devices.
531 questions
{count} votes

Accepted answer
  1. Sander van de Velde | MVP 33,136 Reputation points MVP
    2023-11-24T12:59:00.9866667+00:00

    Hello @PRIYANKA S NAIR ,

    welcome to this moderated Azure community forum.

    The command itself seems fine.

    Do you know what admin rights you have?

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

    Please check this with your administrator or check the ADX cluster/database permissions if accessible.

    Perhaps these roles related commands give more insights too.


    If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.