How to read data from Azure Log Analitycs ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2023 03:53 PM
Hi guys,
I need to read data from Azure Log Analitycs Workspace directaly, have any idea ?
thank you
- Labels:
-
Azure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2023 10:30 PM
Hi @William Scardua
You can use Log Analytics REST API to extract the data from databricks.
Please refer below link for more information-
Log Analytics REST API | Microsoft Learn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2023 08:39 AM
Thank you for sharing best answers here
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2025 04:13 AM
You can use Kusto Spark connector for that: https://github.com/Azure/azure-kusto-spark/blob/master/docs/KustoSource.md#source-read-command
It heavily depends on how you access data, there could be a need for using ADX cluster for it: https://learn.microsoft.com/en-us/azure/data-explorer/query-monitor-data
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
Here is a sample on how to do it using azure-kusto-spark connector with managed identity.
df = spark.read.format("com.microsoft.kusto.spark.datasource") \
.option("kustoCluster", "https://ade.loganalytics.io/subscriptions/{subscriptionid}/resourceGroups/{rg-name}/providers/microsoft.operationalinsights/workspaces/{log-analytics-name}") \
.option("kustoDatabase", "{log-analytics-name}") \
.option("kustoQuery", "Table| take 10") \
.option("managedIdentityAuth", "true") \
.option("managedIdentityClientId", "00000000-0000-0000-0000-000000000000") \
.load()

