Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data-explorer/kusto/query/array-sum-function.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Returns a double type value with the sum of the elements of the array.

## Examples

This following example shows the sum of an array.
The following example shows the sum of an array.

:::moniker range="azure-data-explorer"
> [!div class="nextstepaction"]
Expand Down
2 changes: 1 addition & 1 deletion data-explorer/kusto/query/asin-function.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Calculates the angle whose sine is the specified number, or the arc sine. This i

Returns the value of the arc sine of `x`. Returns `null` if `x` < -1 or `x` > 1.

## Example
## Examples

:::moniker range="azure-data-explorer"
> [!div class="nextstepaction"]
Expand Down
2 changes: 1 addition & 1 deletion data-explorer/kusto/query/atan-function.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Returns the angle whose tangent is the specified number. This is the inverse ope

The value of the arc tangent of `x`.

## Example
## Examples

:::moniker range="azure-data-explorer"
> [!div class="nextstepaction"]
Expand Down
2 changes: 1 addition & 1 deletion data-explorer/kusto/query/avg-aggregation-function.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Calculates the average (arithmetic mean) of *expr* across the group.

Returns the average value of *expr* across the group.

## Example
## Examples

The following example returns the average number of damaged crops per state.

Expand Down
2 changes: 1 addition & 1 deletion data-explorer/kusto/query/avgif-aggregation-function.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Calculates the [average](avg-aggregation-function.md) of *expr* in records for w

Returns the average value of *expr* in records where *predicate* evaluates to `true`.

## Example
## Examples

The following example calculates the average damage by state in cases where there was any damage.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ The `azure_digital_twins_query_request` plugin uses the Microsoft Entra account

## Examples

The following examples show how you can run various Azure Digital Twins queries, including queries that use additional Kusto expressions.

### Retrieval of all twins within an Azure Digital Twins instance

The following example returns all digital twins within an Azure Digital Twins instance.

```kusto
Expand All @@ -48,7 +44,6 @@ evaluate azure_digital_twins_query_request(

:::image type="content" source="media/azure-digital-twins-query-request-plugin/adt-twins.png" alt-text="Screenshot of the twins present in the Azure Digital Twins instance.":::

### Projection of twin properties as columns along with additional Kusto expressions

The following example returns the result from the plugin as separate columns, and then performs additional operations using Kusto expressions.

Expand Down
2 changes: 1 addition & 1 deletion data-explorer/kusto/query/bag-has-key-function.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ datatable(input: dynamic)
|{<br> "key1": 123,<br> "key2": "abc"<br>}|true<br>|
|{<br> "key1": 123,<br> "key3": "abc"<br>}|false<br>|

### Search using a JSONPath key
The following example searches using a JSONPath key.

:::moniker range="azure-data-explorer"
> [!div class="nextstepaction"]
Expand Down
2 changes: 1 addition & 1 deletion data-explorer/kusto/query/bag-keys-function.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Enumerates all the root keys in a dynamic property bag object.

An array of keys, order is undetermined.

## Example
## Examples

:::moniker range="azure-data-explorer"
> [!div class="nextstepaction"]
Expand Down
2 changes: 1 addition & 1 deletion data-explorer/kusto/query/bag-merge-function.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The function merges multiple `dynamic` property bags into a single `dynamic` pro

A `dynamic` property bag containing the merged results of all input property bags. If a key is present in multiple input bags, the value associated with the key from the leftmost argument takes precedence.

## Example
## Examples

:::moniker range="azure-data-explorer"
> [!div class="nextstepaction"]
Expand Down
2 changes: 1 addition & 1 deletion data-explorer/kusto/query/bag-remove-keys-function.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ datatable(input:dynamic)
|{<br> "key1": 123,<br> "key2": "abc"<br>}|{<br> "key1": 123<br>}|
|{<br> "key1": "value",<br> "key3": 42.0<br>}|{<br> "key1": "value",<br> "key3": 42.0<br>}|

### Remove inner properties of dynamic values using JSONPath notation
The following example removes inner properties of dynamic values using JSONPath notation.

:::moniker range="azure-data-explorer"
> [!div class="nextstepaction"]
Expand Down
9 changes: 5 additions & 4 deletions data-explorer/kusto/query/datetime-local-to-utc-function.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ Converts local datetime to UTC datetime using [a time-zone specification](timezo

## Returns

A UTC [datetime](scalar-data-types/datetime.md) that corresponds the local [datetime](scalar-data-types/datetime.md) in the specified `timezone`.
Returns a UTC [datetime](scalar-data-types/datetime.md) that corresponds the local [datetime](scalar-data-types/datetime.md) in the specified `timezone`.

## Example
## Examples

The following example shows how to convert a local datetime to UTC datetime.

:::moniker range="azure-data-explorer"
> [!div class="nextstepaction"]
Expand Down Expand Up @@ -56,14 +58,13 @@ datatable(local_dt: datetime, tz: string)
> Normally there is a 1:1 mapping between UTC and local time, however there is a time ambiguity near the DST transition.
> Translating from local to UTC and then back to local may produce an hour offset between two local datetime values if the clocks were advanced due to DST.


```kusto
range Local from datetime(2022-03-27 01:00:00.0000000) to datetime(2022-03-27 04:00:00.0000000) step 1h
| extend UTC=datetime_local_to_utc(Local, 'Europe/Brussels')
| extend BackToLocal=datetime_utc_to_local(UTC, 'Europe/Brussels')
| extend diff=Local-BackToLocal
```

|Local|UTC|BackToLocal|diff|
|---|---|---|---|
|2022-03-27 02:00:00.0000000|2022-03-27 00:00:00.0000000|2022-03-27 01:00:00.0000000|01:00:00|
Expand Down
6 changes: 4 additions & 2 deletions data-explorer/kusto/query/datetime-part-function.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,14 @@ Extracts the requested date part as an integer value.

## Returns

An integer representing the extracted part.
Returns an integer representing the extracted part.

> [!NOTE]
> `week_of_year` returns an integer which represents the week number. The week number is calculated from the first week of a year, which is the one that includes the first Thursday.

## Example
## Examples

The following example extracts the year, quarter, month, week of year, day, day of year, hour, minute, second, millisecond, microsecond, and nanosecond from a specified datetime value.

:::moniker range="azure-data-explorer"
> [!div class="nextstepaction"]
Expand Down
4 changes: 2 additions & 2 deletions data-explorer/kusto/query/datetime-timespan-arithmetic.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ is a system for describing a point in time as the number of seconds that have el
If your data includes representation of Unix time as an integer, or you require converting to it,
the following functions are available.

### From Unix time
The following example converts Unix time to UTC datetime.

:::moniker range="azure-data-explorer"
> [!div class="nextstepaction"]
Expand All @@ -66,7 +66,7 @@ print result = fromUnixTime(1546897531)
|---|
| 2019-01-07 21:45:31.0000000 |

### To Unix time
The following example converts UTC datetime to Unix time.

:::moniker range="azure-data-explorer"
> [!div class="nextstepaction"]
Expand Down
6 changes: 4 additions & 2 deletions data-explorer/kusto/query/datetime-utc-to-local-function.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ Converts UTC [datetime](scalar-data-types/datetime.md) to local datetime using a

## Returns

A local datetime in the *timezone* that corresponds the UTC datetime.
Returns a local datetime in the *timezone* that corresponds the UTC datetime.

## Example
## Examples

The following example shows how to convert a UTC datetime to local datetime.

:::moniker range="azure-data-explorer"
> [!div class="nextstepaction"]
Expand Down
8 changes: 5 additions & 3 deletions data-explorer/kusto/query/day-of-month-function.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ms.date: 08/11/2024

> [!INCLUDE [applies](../includes/applies-to-version/applies.md)] [!INCLUDE [fabric](../includes/applies-to-version/fabric.md)] [!INCLUDE [azure-data-explorer](../includes/applies-to-version/azure-data-explorer.md)] [!INCLUDE [monitor](../includes/applies-to-version/monitor.md)] [!INCLUDE [sentinel](../includes/applies-to-version/sentinel.md)]

Returns an integer representing the day number of the given datetime.
Provides the day of the month as an integer from a specified datetime value.

## Syntax

Expand All @@ -25,9 +25,11 @@ Returns an integer representing the day number of the given datetime.

## Returns

An integer representing the day number of the given datetime.
Returns an integer representing the day number of the given datetime.

## Examples

## Example
The following example shows how to extract the day of the month from a specified datetime value.

:::moniker range="azure-data-explorer"
> [!div class="nextstepaction"]
Expand Down
6 changes: 3 additions & 3 deletions data-explorer/kusto/query/day-of-week-function.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ms.date: 08/11/2024

> [!INCLUDE [applies](../includes/applies-to-version/applies.md)] [!INCLUDE [fabric](../includes/applies-to-version/fabric.md)] [!INCLUDE [azure-data-explorer](../includes/applies-to-version/azure-data-explorer.md)] [!INCLUDE [monitor](../includes/applies-to-version/monitor.md)] [!INCLUDE [sentinel](../includes/applies-to-version/sentinel.md)]

Returns the number of days since the preceding Sunday, as a `timespan`.
Provides the number of days since the preceding Sunday, as a `timespan`.

To convert `timespan` to `int`, see [Convert timespan to integer](#convert-timespan-to-integer).

Expand All @@ -27,11 +27,11 @@ To convert `timespan` to `int`, see [Convert timespan to integer](#convert-times

## Returns

The `timespan` since midnight at the beginning of the preceding Sunday, rounded down to an integer number of days.
Returns the `timespan` since midnight at the beginning of the preceding Sunday, rounded down to an integer number of days.

## Examples

The following example returns 0, indicating that the specified datetime is a Sunday.
The follow example shows how to extract the day of the week from a specified datetime value.

:::moniker range="azure-data-explorer"
> [!div class="nextstepaction"]
Expand Down
6 changes: 4 additions & 2 deletions data-explorer/kusto/query/day-of-year-function.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ms.date: 08/11/2024

> [!INCLUDE [applies](../includes/applies-to-version/applies.md)] [!INCLUDE [fabric](../includes/applies-to-version/fabric.md)] [!INCLUDE [azure-data-explorer](../includes/applies-to-version/azure-data-explorer.md)] [!INCLUDE [monitor](../includes/applies-to-version/monitor.md)] [!INCLUDE [sentinel](../includes/applies-to-version/sentinel.md)]

Returns the integer number represents the day number of the given year.
Provides the integer that represents the day of the year for a specified datetime value.

## Syntax

Expand All @@ -27,7 +27,9 @@ Returns the integer number represents the day number of the given year.

The day number of the given year.

## Example
## Examples

The following example shows how to extract the day of the year from a specified datetime value.

:::moniker range="azure-data-explorer"
> [!div class="nextstepaction"]
Expand Down
4 changes: 2 additions & 2 deletions data-explorer/kusto/query/dcount-aggregation-function.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ Calculates an estimate of the number of distinct values that are taken by a scal

Returns an estimate of the number of distinct values of *expr* in the group.

## Example
## Examples

This example shows how many types of storm events happened in each state.
The following example shows how many types of storm events happened in each state.

:::moniker range="azure-data-explorer"
> [!div class="nextstepaction"]
Expand Down
4 changes: 2 additions & 2 deletions data-explorer/kusto/query/dcountif-aggregation-function.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ Returns an estimate of the number of distinct values of *expr* for rows in which
> [!TIP]
> `dcountif()` might return an error in cases where all, or none of the rows pass the `Predicate` expression.

## Example
## Examples

This example shows how many types of fatal storm events happened in each state.
The following example shows how many types of fatal storm events happened in each state.

:::moniker range="azure-data-explorer"
> [!div class="nextstepaction"]
Expand Down
4 changes: 3 additions & 1 deletion data-explorer/kusto/query/degrees-function.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@ Converts angle value in radians into value in degrees, using the formula `degree

## Returns

The corresponding angle in degrees for an angle specified in radians.
Returns the corresponding angle in degrees for an angle specified in radians.

## Examples

The following example shows how to convert radians to degrees.

:::moniker range="azure-data-explorer"
> [!div class="nextstepaction"]
> <a href="https://dataexplorer.azure.com/clusters/help/databases/Samples?query=H4sIAAAAAAAAAysoyswrUUhJTS9KTS02ULCFMTUKMjU09U00dWAChmhyWoZ6pghZIyRZA00AiS3HB1UAAAA=" target="_blank">Run the query</a>
Expand Down