You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-monitor/essentials/data-collection-transformations-structure.md
+21-3Lines changed: 21 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,11 +10,11 @@ ms.reviwer: nikeist
10
10
---
11
11
12
12
# Structure of transformation in Azure Monitor
13
-
[Transformations in Azure Monitor](./data-collection-transformations.md) allow you to filter or modify incoming data before it's stored in a Log Analytics workspace. They are implemented as a Kusto Query Language (KQL) statement in a [data collection rule (DCR)](data-collection-rule-overview.md). This article provides details on how this query is structured and limitations on the KQL language allowed.
13
+
[Transformations in Azure Monitor](./data-collection-transformations.md) allow you to filter or modify incoming data before it's stored in a Log Analytics workspace. They're implemented as a Kusto Query Language (KQL) statement in a [data collection rule (DCR)](data-collection-rule-overview.md). This article provides details on how this query is structured and limitations on the KQL language allowed.
14
14
15
15
16
16
## Transformation structure
17
-
The KQL statement is applied individually to each entry in the data source. It must understand the format of the incoming data and create output in the structure of the target table. The input stream is represented by a virtual table named `source`with columns matching the input data stream definition. Following is a typical example of a transformation. This example includes the following functionality:
17
+
The KQL statement is applied individually to each entry in the data source. It must understand the format of the incoming data and create output in the structure of the target table. A virtual table named `source` represents the input stream. `source`table columns match the input data stream definition. Following is a typical example of a transformation. This example includes the following functionality:
18
18
19
19
- Filters the incoming data with a [where](/azure/data-explorer/kusto/query/whereoperator) statement
20
20
- Adds a new column using the [extend](/azure/data-explorer/kusto/query/extendoperator) operator
@@ -297,7 +297,7 @@ The following [Bitwise operators](/azure/data-explorer/kusto/query/binoperators)
297
297
298
298
##### parse_cef_dictionary
299
299
300
-
Given a string containing a CEF message, `parse_cef_dictionary` parses the Extension property of the message into a dynamic key/value object. Semicolon is a reserved character that should be replaced prior to passing the raw message into the method, as shown in the example below.
300
+
Given a string containing a CEF message, `parse_cef_dictionary` parses the Extension property of the message into a dynamic key/value object. Semicolon is a reserved character that should be replaced prior to passing the raw message into the method, as shown in the example.
@@ -308,6 +308,24 @@ Given a string containing a CEF message, `parse_cef_dictionary` parses the Exten
308
308
309
309
:::image type="content" source="media/data-collection-transformations-structure/parse_cef_dictionary.png" alt-text="Sample output of parse_cef_dictionary function." lightbox="media/data-collection-transformations-structure/parse_cef_dictionary.png":::
310
310
311
+
##### geo_location
312
+
313
+
Given a string containing IP address (IPv4 and IPv6 are supported), `geo_location` function returns approximate geographical location, including the following attributes:
314
+
* Country
315
+
* Region
316
+
* State
317
+
* City
318
+
* Latitude
319
+
* Longitude
320
+
321
+
```kusto
322
+
| extend GeoLocation = geo_location("1.0.0.5")
323
+
```
324
+
325
+
:::image type="content" source="media/data-collection-transformations-structure/geo-location.png" alt-text="Screenshot of sample output of geo_location function." lightbox="media/data-collection-transformations-structure/parse_cef_dictionary.png":::
326
+
327
+
> [!IMPORTANT]
328
+
> Due to nature of IP geolocation service utilized by this function, it may introduce data ingestion latency if used excessively. Exercise caution when using this function more than several times per transformation.
311
329
312
330
### Identifier quoting
313
331
Use [Identifier quoting](/azure/data-explorer/kusto/query/schema-entities/entity-names?q=identifier#identifier-quoting) as required.
0 commit comments