Max
Max

Reputation: 9889

T-SQL queries in Azure Log Analytics Workspaces?

Azure Data Explorer supposedly supports T-SQL queries:

The Kusto.Explorer tool supports T-SQL queries to Kusto. To instruct Kusto.Explorer to execute a query, begin the query with an empty T-SQL comment line (--).

However, I can't get this to work in a Log Analytics Workspace.

For instance, this Kusto query works fine and returns results:

ContainerInstanceLog_CL
| where Message has "Hamlet"
| limit 500

But any attempt to use T-SQL (with a leading empty comment line) ...

--
SELECT * FROM ContainerInstanceLog_CL

...fails with

Query could not be parsed at '-' on line [1,1]

Token: -
Line: 1
Position: 1

Are T-SQL queries not supported in Log Analytics Workspaces?

Upvotes: 0

Views: 389

Answers (2)

roshaga
roshaga

Reputation: 257

Writing my comment as an answer as suggested.

Log Analytics Workspaces supports only Kusto as of now. You can further integrate it with power BI for better analytics options.

Upvotes: 1

CHEEKATLAPRADEEP
CHEEKATLAPRADEEP

Reputation: 12788

Unfortunately, you cannot run T-SQL queries in Azure Log Analytics Workspaces.

enter image description here

I would suggest you to provide feedback on the same:

https://feedback.azure.com/forums/267889-azure-monitor-log-analytics

All of the feedback you share in these forums will be monitored and reviewed by the Microsoft engineering teams responsible for building Azure.


T-SQL queries run on the Azure Data Explorer:

enter image description here

Upvotes: 1

Related Questions