I have 100+ tables in Azure Data Explorer and they all start with the same string. I want to drop them all but it seems like .drop tables string* doesn't work..
How can I drop multiple tables at once?
any help will be appreciated!
I have 100+ tables in Azure Data Explorer and they all start with the same string. I want to drop them all but it seems like .drop tables string* doesn't work..
How can I drop multiple tables at once?
any help will be appreciated!
you can use the following to generate the text of a .drop tables command, then invoke that text as the 2nd step.
.show tables
| where TableName startswith "MyPrefix"
| summarize cmd = strcat(
".drop tables (",
strcat_array(make_list(strcat("['", TableName, "']")), ","),
")"
)