diff --git a/data-explorer/kusto/query/activity-counts-metrics-plugin.md b/data-explorer/kusto/query/activity-counts-metrics-plugin.md index 71633d2582..023ed8c2bd 100644 --- a/data-explorer/kusto/query/activity-counts-metrics-plugin.md +++ b/data-explorer/kusto/query/activity-counts-metrics-plugin.md @@ -45,8 +45,6 @@ The following table describes the output table schema. ## Examples -### Daily activity counts - The next query calculates daily activity counts for the provided input table. :::moniker range="azure-data-explorer" diff --git a/data-explorer/kusto/query/activity-engagement-plugin.md b/data-explorer/kusto/query/activity-engagement-plugin.md index b3df7ac8e3..77e8fcf6a4 100644 --- a/data-explorer/kusto/query/activity-engagement-plugin.md +++ b/data-explorer/kusto/query/activity-engagement-plugin.md @@ -44,8 +44,6 @@ Output table schema is: ## Examples -### DAU/WAU calculation - The following example calculates DAU/WAU (Daily Active Users / Weekly Active Users ratio) over a randomly generated data. :::moniker range="azure-data-explorer" @@ -70,8 +68,6 @@ range _day from _start to _end step 1d :::image type="content" source="media/activity-engagement-plugin/activity-engagement-dau-wau.png" border="false" alt-text="Graph displaying the ratio of daily active users to weekly active users as specified in the query."::: -### DAU/MAU calculation - The following example calculates DAU/WAU (Daily Active Users / Weekly Active Users ratio) over a randomly generated data. :::moniker range="azure-data-explorer" @@ -95,9 +91,7 @@ range _day from _start to _end step 1d ``` :::image type="content" source="media/activity-engagement-plugin/activity-engagement-dau-mau.png" border="false" alt-text="Graph displaying the ratio of daily active users to monthly active users as specified in the query."::: - -### DAU/MAU calculation with additional dimensions - + The following example calculates DAU/WAU (Daily Active Users / Weekly Active Users ratio) over a randomly generated data with additional dimension (`mod3`). :::moniker range="azure-data-explorer" diff --git a/data-explorer/kusto/query/activity-metrics-plugin.md b/data-explorer/kusto/query/activity-metrics-plugin.md index 3e1c6e7265..b149afcf14 100644 --- a/data-explorer/kusto/query/activity-metrics-plugin.md +++ b/data-explorer/kusto/query/activity-metrics-plugin.md @@ -76,15 +76,14 @@ where the `# of customer lost in the period` is defined as: The higher score means the larger number of users are NOT returning to the service. ***Churn vs. Retention Rate*** + The churn vs. retention Rate is derived from the definition of `Churn Rate` and `Retention Rate`. The following calculation is always true: > [`Retention Rate`] = 100.0% - [`Churn Rate`] ## Examples -### Weekly retention rate and churn rate - -The next query calculates retention and churn rate for week-over-week window. +The following example calculates retention and churn rate for week-over-week window. :::moniker range="azure-data-explorer" > [!div class="nextstepaction"] @@ -135,9 +134,8 @@ range _day from _start to _end step 1d :::image type="content" source="media/activity-metrics-plugin/activity-metrics-churn-and-retention.png" border="false" alt-text="Table showing the calculated retention and churn rates per seven days as specified in the query."::: -### Distinct values and distinct 'new' values -The next query calculates distinct values and 'new' values (IDs that didn't appear in previous time window) for week-over-week window. +The following example calculates distinct values and 'new' values (IDs that didn't appear in previous time window) for week-over-week window. :::moniker range="azure-data-explorer" > [!div class="nextstepaction"] diff --git a/data-explorer/kusto/query/ai-chat-completion-prompt-plugin.md b/data-explorer/kusto/query/ai-chat-completion-prompt-plugin.md index 27ffc01e30..bcbe062954 100644 --- a/data-explorer/kusto/query/ai-chat-completion-prompt-plugin.md +++ b/data-explorer/kusto/query/ai-chat-completion-prompt-plugin.md @@ -142,11 +142,11 @@ evaluate ai_chat_completion_prompt(prompt, connectionString) ``` ::: moniker-end -The following example sends a separate prompt for each row to the Azure OpenAI chat completion model. ::: moniker range="azure-data-explorer" ### [Managed Identity](#tab/managed-identity) +The following example sends a separate prompt for each row to the Azure OpenAI chat completion model. ~~~kusto diff --git a/data-explorer/kusto/query/all-graph-function.md b/data-explorer/kusto/query/all-graph-function.md index 95f6607cd9..9c1b929c7b 100644 --- a/data-explorer/kusto/query/all-graph-function.md +++ b/data-explorer/kusto/query/all-graph-function.md @@ -35,10 +35,6 @@ For zero length paths, the condition evaluates to `true`. ## Examples -The examples in this section show how to use the syntax to help you get started. - -### Find all round-trip paths between two train stations using different lines for each direction - The following example shows how to use the `graph-match` operator with the `all()` function to find all round-trip paths between two stations in a transportation network. It uses a different line for each direction. The query constructs a graph from the `connections` data, finding all paths up to five connections long that use the `"red"` line for the outward route, and the `"blue"` line for the return route. The `all()` function ensures that all edges in the variable length edge are part of the same line, either `"red"` or `"blue"`. :::moniker range="azure-data-explorer" @@ -88,7 +84,6 @@ connections |Central|South->South-West|West|Central->East|Central| |West|South-West->South|Central|East->Central|West| -### Find the shortest path between two stations with Wi-Fi available The following example shows how to use the `graph-shortest-paths` operator with the `all()` and `inner_nodes` functions to find a path between two stations in a transportation network. The query constructs a graph from the `connections` data and finds the shortest path from the `"South-West"` station to the `"North"` station, passing through stations where Wi-Fi is available. diff --git a/data-explorer/kusto/query/anomaly-diagnosis.md b/data-explorer/kusto/query/anomaly-diagnosis.md index 9611a616ee..035b880275 100644 --- a/data-explorer/kusto/query/anomaly-diagnosis.md +++ b/data-explorer/kusto/query/anomaly-diagnosis.md @@ -126,7 +126,6 @@ demo_clustering1 | 2016-08-23 15:00:58.2222707 | scus | su5 | 9dbd1b161d5b4779a73cf19a7836ebd6 | 10007007 | 8215dcf6-2de0-42bd-9c90-181c70486c9c | | 2016-08-23 15:00:59.9382620 | scus | su3 | 90d3d2fc7ecc430c9621ece335651a01 | 10007006 | 451e3c4c-0808-4566-a64d-84d85cf30978 | -### Use autocluster() for single record set clustering Even though there are less than a thousand exceptions, it's still hard to find common segments, since there are multiple values in each column. You can use the [`autocluster()`](autocluster-plugin.md) plugin to instantly extract a short list of common segments and find the interesting clusters within the spike's two minutes, as seen in the following query: @@ -155,7 +154,6 @@ You can see from the results above that the most dominant segment contains 65.74 Autocluster uses a proprietary algorithm for mining multiple dimensions and extracting interesting segments. "Interesting" means that each segment has significant coverage of both the records set and the features set. The segments are also diverged, meaning that each one is different from the others. One or more of these segments might be relevant for the RCA process. To minimize segment review and assessment, autocluster extracts only a small segment list. -### Use basket() for single record set clustering You can also use the [`basket()`](basket-plugin.md) plugin as seen in the following query: diff --git a/data-explorer/kusto/query/any-graph-function.md b/data-explorer/kusto/query/any-graph-function.md index 33f1fd9a4d..85deea5ac2 100644 --- a/data-explorer/kusto/query/any-graph-function.md +++ b/data-explorer/kusto/query/any-graph-function.md @@ -35,10 +35,6 @@ For zero length paths, the condition evaluates to `false`. ## Examples -The examples in this section show how to use the syntax to help you get started. - -### Find any round-trip paths between two train stations using different lines in each direction - The following example uses the `Locations` and `Routes` data tables to construct a graph that finds paths from a source location to a destination location through a `route`. It uses `any()` function to find paths that uses `"Train"` transportation method at least once. It returns the source location name, destination location name and transportation methods along the route. :::moniker range="azure-data-explorer" @@ -85,7 +81,6 @@ Routes | New York | Seattle | [
"Train",
"Train"
] | | Los Angeles | Chicago | [
"Truck",
"Train"
]| -### Find the shortest path between two stations with Wi-Fi available The following example shows how to use the `graph-shortest-paths` operator with the `any()` and `inner_nodes` functions to find a path between two stations in a transportation network. The query constructs a graph from the `connections` data and finds the shortest path from the `"South-West"` station to the `"North"` station, passing through at least one station where Wi-Fi is available. diff --git a/data-explorer/kusto/query/arg-max-aggregation-function.md b/data-explorer/kusto/query/arg-max-aggregation-function.md index 75efc64aa0..28f9d0af98 100644 --- a/data-explorer/kusto/query/arg-max-aggregation-function.md +++ b/data-explorer/kusto/query/arg-max-aggregation-function.md @@ -37,8 +37,6 @@ Returns a row in the table that maximizes the specified expression *ExprToMaximi ## Examples -### Find maximum latitude - The following example finds the maximum latitude of a storm event in each state. :::moniker range="azure-data-explorer" @@ -69,7 +67,6 @@ The results table displays only the first 10 rows. | TEXAS | 36.4607 | DARROUZETT | | ... | ... | ... | -### Find last state fatal event The following example finds the last time an event with a direct death happened in each state, showing all the columns. @@ -104,7 +101,6 @@ The results table displays only the first 10 rows and first three columns. | LAKE MICHIGAN | 2007-06-07T13:00:00Z | 2007-06-07T13:00:00Z | ... | | ... | ... | ... | ... | -### Handle nulls The following example demonstrates null handling. @@ -141,7 +137,7 @@ The arg_max() function differs from the [max() function](max-aggregation-functio #### arg_max() -Find the last time an event with a direct death happened, showing all the columns in the table. +The following example finds the last time an event with a direct death happened, showing all the columns in the table. The query first filters the events to only include events where there was at least one direct death. Then the query returns the entire row with the most recent (maximum) StartTime. diff --git a/data-explorer/kusto/query/around-function.md b/data-explorer/kusto/query/around-function.md index be7508e1a7..33d4cf1d38 100644 --- a/data-explorer/kusto/query/around-function.md +++ b/data-explorer/kusto/query/around-function.md @@ -30,7 +30,7 @@ Creates a `bool` value indicating if the first argument is within a range around Returns `true` if the value is within the range, `false` if the value is outside the range. Returns `null` if any of the arguments is `null`. -## Example: Filtering values around a specific timestamp +## Examples The following example filters rows around specific timestamp. diff --git a/data-explorer/kusto/query/array-concat-function.md b/data-explorer/kusto/query/array-concat-function.md index 35ab6be380..44fd8f6e25 100644 --- a/data-explorer/kusto/query/array-concat-function.md +++ b/data-explorer/kusto/query/array-concat-function.md @@ -27,7 +27,7 @@ Concatenates many dynamic arrays to a single array. Returns a dynamic array of all input arrays. -## Example +## Examples The following example shows concatenated arrays. diff --git a/data-explorer/kusto/query/array-index-of-function.md b/data-explorer/kusto/query/array-index-of-function.md index edd4e9cb72..e620b446b4 100644 --- a/data-explorer/kusto/query/array-index-of-function.md +++ b/data-explorer/kusto/query/array-index-of-function.md @@ -33,7 +33,7 @@ Returns a zero-based index position of lookup. Returns -1 if the value isn't found in the array. Returns *null* for irrelevant inputs (*occurrence* < 0 or *length* < -1). -## Example +## Examples The following example shows the position number of specific words within the array. diff --git a/data-explorer/kusto/query/array-reverse-function.md b/data-explorer/kusto/query/array-reverse-function.md index 3e6df4025c..4314df31b1 100644 --- a/data-explorer/kusto/query/array-reverse-function.md +++ b/data-explorer/kusto/query/array-reverse-function.md @@ -27,9 +27,9 @@ Reverses the order of the elements in a dynamic array. Returns an array that contains the same elements as the input array in reverse order. -## Example +## Examples -This example shows an array of words reversed. +The following example shows an array of words reversed. :::moniker range="azure-data-explorer" > [!div class="nextstepaction"] diff --git a/data-explorer/kusto/query/array-rotate-left-function.md b/data-explorer/kusto/query/array-rotate-left-function.md index 02a1434b83..941d37dd9a 100644 --- a/data-explorer/kusto/query/array-rotate-left-function.md +++ b/data-explorer/kusto/query/array-rotate-left-function.md @@ -30,7 +30,7 @@ Dynamic array containing the same elements as the original array with each eleme ## Examples -Rotating to the left by two positions: +The following example shows rotating to the left by two positions: :::moniker range="azure-data-explorer" > [!div class="nextstepaction"] @@ -48,7 +48,7 @@ print arr=dynamic([1,2,3,4,5]) |---|---| |[1,2,3,4,5]|[3,4,5,1,2]| -Rotating to the right by two positions by using negative rotate_count value: +The following example shows rotating to the right by two positions by using negative rotate_count value: :::moniker range="azure-data-explorer" > [!div class="nextstepaction"] diff --git a/data-explorer/kusto/query/array-rotate-right-function.md b/data-explorer/kusto/query/array-rotate-right-function.md index 856182cfc9..6a9f34ae4a 100644 --- a/data-explorer/kusto/query/array-rotate-right-function.md +++ b/data-explorer/kusto/query/array-rotate-right-function.md @@ -30,7 +30,7 @@ Dynamic array containing the same elements as the original array with each eleme ## Examples -Rotating to the right by two positions: +The following example shows rotating to the right by two positions: :::moniker range="azure-data-explorer" > [!div class="nextstepaction"] @@ -48,7 +48,7 @@ print arr=dynamic([1,2,3,4,5]) |---|---| |[1,2,3,4,5]|[4,5,1,2,3]| -Rotating to the left by two positions by using negative rotate_count value: +The following example shows rotating to the left by two positions by using negative rotate_count value: :::moniker range="azure-data-explorer" > [!div class="nextstepaction"] diff --git a/data-explorer/kusto/query/array-shift-left-function.md b/data-explorer/kusto/query/array-shift-left-function.md index bf6b410931..84c6275846 100644 --- a/data-explorer/kusto/query/array-shift-left-function.md +++ b/data-explorer/kusto/query/array-shift-left-function.md @@ -31,7 +31,7 @@ Returns a dynamic array containing the same number of elements as in the origina ## Examples -Shifting to the left by two positions: +The following example shows shifting to the left by two positions: :::moniker range="azure-data-explorer" > [!div class="nextstepaction"] @@ -49,7 +49,7 @@ print arr=dynamic([1,2,3,4,5]) |---|---| |[1,2,3,4,5]|[3,4,5,null,null]| -Shifting to the left by two positions and adding default value: +The following example shows shifting to the left by two positions and adding default value: :::moniker range="azure-data-explorer" > [!div class="nextstepaction"] @@ -67,7 +67,7 @@ print arr=dynamic([1,2,3,4,5]) |---|---| |[1,2,3,4,5]|[3,4,5,-1,-1]| -Shifting to the right by two positions by using negative *shift_count* value: +The following example shows shifting to the right by two positions by using negative *shift_count* value: :::moniker range="azure-data-explorer" > [!div class="nextstepaction"] diff --git a/data-explorer/kusto/query/array-shift-right-function.md b/data-explorer/kusto/query/array-shift-right-function.md index 9b04fc2a08..b8cdf58fb2 100644 --- a/data-explorer/kusto/query/array-shift-right-function.md +++ b/data-explorer/kusto/query/array-shift-right-function.md @@ -31,7 +31,7 @@ Returns a dynamic array containing the same amount of the elements as in the ori ## Examples -Shifting to the right by two positions: +The following example shows shifting to the right by two positions: :::moniker range="azure-data-explorer" > [!div class="nextstepaction"] @@ -49,7 +49,7 @@ print arr=dynamic([1,2,3,4,5]) |---|---| |[1,2,3,4,5]|[null,null,1,2,3]| -Shifting to the right by two positions and adding a default value: +The following example shows shifting to the right by two positions and adding a default value: :::moniker range="azure-data-explorer" > [!div class="nextstepaction"] @@ -67,7 +67,7 @@ print arr=dynamic([1,2,3,4,5]) |---|---| |[1,2,3,4,5]|[-1,-1,1,2,3]| -Shifting to the left by two positions by using a negative shift_count value: +The following example shows shifting to the left by two positions by using a negative shift_count value: :::moniker range="azure-data-explorer" > [!div class="nextstepaction"] diff --git a/data-explorer/kusto/query/array-sort-asc-function.md b/data-explorer/kusto/query/array-sort-asc-function.md index 63d7076791..373a6ed44b 100644 --- a/data-explorer/kusto/query/array-sort-asc-function.md +++ b/data-explorer/kusto/query/array-sort-asc-function.md @@ -41,9 +41,6 @@ An array which contains elements of different types, is sorted in the following ## Examples -The examples in this section show how to use the syntax to help you get started. - -### Sort two arrays The following example sorts the initial array, `array1`, in ascending order. It then sorts `array2` to match the new order of `array1`. @@ -67,7 +64,6 @@ print array_sort_asc(array1,array2) > [!NOTE] > The output column names are generated automatically, based on the arguments to the function. To assign different names to the output columns, use the following syntax: `... | extend (out1, out2) = array_sort_asc(array1,array2)`. -### Sort substrings The following example sorts a list of names in ascending order. It saves a list of names to a variable, `Names`, which is then splits into an array and sorted in ascending order. The query returns the names in ascending order. @@ -88,7 +84,6 @@ print result = SortedNames |---| |Jane,John,Kao,Paul| -### Combine summarize and array_sort_asc The following example uses the `summarize` operator and the `array_sort_asc` function to organize and sort commands by user in chronological order. @@ -123,7 +118,6 @@ datatable(command:string, command_time:datetime, user_id:string) > [!NOTE] > If your data might contain `null` values, use [make_list_with_nulls](make-list-with-nulls-aggregation-function.md) instead of [make_list](make-list-aggregation-function.md). -### Control location of `null` values By default, `null` values are put last in the sorted array. However, you can control it explicitly by adding a `bool` value as the last argument to `array_sort_asc()`. diff --git a/data-explorer/kusto/query/array-sort-desc-function.md b/data-explorer/kusto/query/array-sort-desc-function.md index d00d70050e..1bdf77b31d 100644 --- a/data-explorer/kusto/query/array-sort-desc-function.md +++ b/data-explorer/kusto/query/array-sort-desc-function.md @@ -43,10 +43,6 @@ An array which contains elements of different types, is sorted in the following ## Examples -The examples in this section show how to use the syntax to help you get started. - -### Sort two arrays - The following example sorts the initial array, `array1`, in descending order. It then sorts `array2` to match the new order of `array1`. :::moniker range="azure-data-explorer" @@ -69,7 +65,6 @@ print array_sort_desc(array1,array2) > [!NOTE] > The output column names are generated automatically, based on the arguments to the function. To assign different names to the output columns, use the following syntax: `... | extend (out1, out2) = array_sort_desc(array1,array2)`. -## Sort substrings The following example sorts a list of names in descending order. It saves a list of names to a variable, `Names`, which is then splits into an array and sorted in descending order. The query returns the names in descending order. @@ -90,7 +85,6 @@ print result = SortedNames |---| |Paul,Kayo,John,Jane| -### Combine summarize and array_sort_desc The following example uses the `summarize` operator and the `array_sort_asc` function to organize and sort commands by user in descending chronological order. @@ -125,7 +119,6 @@ datatable(command:string, command_time:datetime, user_id:string) > [!NOTE] > If your data can contain `null` values, use [make_list_with_nulls](make-list-with-nulls-aggregation-function.md) instead of [make_list](make-list-aggregation-function.md). -### Control location of `null` values By default, `null` values are put last in the sorted array. However, you can control it explicitly by adding a `bool` value as the last argument to `array_sort_asc()`. diff --git a/data-explorer/kusto/query/array-split-function.md b/data-explorer/kusto/query/array-split-function.md index 6890771c49..a3c867d61a 100644 --- a/data-explorer/kusto/query/array-split-function.md +++ b/data-explorer/kusto/query/array-split-function.md @@ -30,8 +30,6 @@ Returns a dynamic array containing N+1 arrays with the values in the range `[0.. ## Examples -This following example shows how to split and array. - :::moniker range="azure-data-explorer" > [!div class="nextstepaction"] > Run the query diff --git a/data-explorer/kusto/query/array-sum-function.md b/data-explorer/kusto/query/array-sum-function.md index b713a22f25..27757123f3 100644 --- a/data-explorer/kusto/query/array-sum-function.md +++ b/data-explorer/kusto/query/array-sum-function.md @@ -31,7 +31,7 @@ Returns a double type value with the sum of the elements of the array. > [!NOTE] > If the array contains elements of non-numeric types, the result is `null`. -## Example +## Examples This following example shows the sum of an array. diff --git a/data-explorer/kusto/query/bin-function.md b/data-explorer/kusto/query/bin-function.md index 359a68cfa8..a35723ba5d 100644 --- a/data-explorer/kusto/query/bin-function.md +++ b/data-explorer/kusto/query/bin-function.md @@ -36,8 +36,7 @@ The nearest multiple of *roundTo* below *value*. Null values, a null bin size, o ## Examples -### Numeric bin - +The following example demonstrates the `bin()` function with numeric data. :::moniker range="azure-data-explorer" > [!div class="nextstepaction"] > Run the query @@ -53,7 +52,7 @@ print bin(4.5, 1) |--| |4| -### Timespan bin +The following example demonstrates the `bin()` function with timespan data. :::moniker range="azure-data-explorer" > [!div class="nextstepaction"] @@ -70,7 +69,7 @@ print bin(time(16d), 7d) |--| |14:00:00:00| -### Datetime bin +The following example demonstrates the `bin()` function with datetime data. :::moniker range="azure-data-explorer" > [!div class="nextstepaction"] @@ -87,8 +86,6 @@ print bin(datetime(1970-05-11 13:45:07), 1d) |--| |1970-05-11T00:00:00Z| -### Pad a table with null bins - When there are rows for bins with no corresponding row in the table, we recommend to pad the table with those bins. The following query looks at strong wind storm events in California for a week in April. However, there are no events on some of the days. :::moniker range="azure-data-explorer" diff --git a/data-explorer/kusto/query/binary-all-and-aggregation-function.md b/data-explorer/kusto/query/binary-all-and-aggregation-function.md index bb24aa2512..5e10b86c7d 100644 --- a/data-explorer/kusto/query/binary-all-and-aggregation-function.md +++ b/data-explorer/kusto/query/binary-all-and-aggregation-function.md @@ -28,9 +28,9 @@ Accumulates values using the binary `AND` operation for each summarization group Returns an aggregated value using the binary `AND` operation over records for each summarization group, or in total if a group isn't specified. -## Example +## Examples -The following example produces `CAFEF00D` using binary `AND` operations: +The following example produces `CAFEF00D` using binary `AND` operations. :::moniker range="azure-data-explorer" > [!div class="nextstepaction"] diff --git a/data-explorer/kusto/query/binary-all-or-aggregation-function.md b/data-explorer/kusto/query/binary-all-or-aggregation-function.md index 1ad5af1ac0..fb60467575 100644 --- a/data-explorer/kusto/query/binary-all-or-aggregation-function.md +++ b/data-explorer/kusto/query/binary-all-or-aggregation-function.md @@ -29,9 +29,9 @@ Accumulates values using the binary `OR` operation for each summarization group, Returns an aggregated value using the binary `OR` operation over records for each summarization group, or in total if a group isn't specified. -## Example +## Examples -The following example produces `CAFEF00D` using binary `OR` operations: +The following example produces `CAFEF00D` using binary `OR` operations. :::moniker range="azure-data-explorer" > [!div class="nextstepaction"] diff --git a/data-explorer/kusto/query/binary-all-xor-aggregation-function.md b/data-explorer/kusto/query/binary-all-xor-aggregation-function.md index 9c566a766e..61fb84dc8f 100644 --- a/data-explorer/kusto/query/binary-all-xor-aggregation-function.md +++ b/data-explorer/kusto/query/binary-all-xor-aggregation-function.md @@ -29,9 +29,9 @@ Accumulates values using the binary `XOR` operation for each summarization group Returns a value that is aggregated using the binary `XOR` operation over records for each summarization group, or in total if a group isn't specified. -## Example +## Examples -The following example produces `CAFEF00D` using binary `XOR` operations: +The following example produces `CAFEF00D` using binary `XOR` operations. :::moniker range="azure-data-explorer" > [!div class="nextstepaction"] diff --git a/data-explorer/kusto/query/binary-and-function.md b/data-explorer/kusto/query/binary-and-function.md index 675ff902ab..483f0fc0a6 100644 --- a/data-explorer/kusto/query/binary-and-function.md +++ b/data-explorer/kusto/query/binary-and-function.md @@ -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 a result of the bitwise `AND` operation between two values. +Perforerms a bitwise `AND` operation on two values. ## Syntax @@ -26,4 +26,21 @@ Returns a result of the bitwise `AND` operation between two values. ## Returns -Returns logical `AND` operation on a pair of numbers: value1 & value2. +Returns the result of a bitwise `AND` operation between `value1` and `value2`. + +## Examples + +:::moniker range="azure-data-explorer" +> [!div class="nextstepaction"] +> Run the query +::: moniker-end + +```kusto +print result = binary_and(6, 3) +``` + +Output: + +``` +2 +``` diff --git a/data-explorer/kusto/query/binary-not-function.md b/data-explorer/kusto/query/binary-not-function.md index 4b781d0271..cda9b39602 100644 --- a/data-explorer/kusto/query/binary-not-function.md +++ b/data-explorer/kusto/query/binary-not-function.md @@ -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 a bitwise negation of the input value. +Performs a bitwise negation operation on a given value. ## Syntax @@ -27,7 +27,7 @@ Returns a bitwise negation of the input value. Returns logical NOT operation on a number: value. -## Example +## Examples :::moniker range="azure-data-explorer" > [!div class="nextstepaction"] diff --git a/data-explorer/kusto/query/binary-or-function.md b/data-explorer/kusto/query/binary-or-function.md index 736d646a21..7f131c3253 100644 --- a/data-explorer/kusto/query/binary-or-function.md +++ b/data-explorer/kusto/query/binary-or-function.md @@ -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 a result of the bitwise `or` operation of the two values. +Performs a bitwise `or` operation on two values. ## Syntax @@ -27,3 +27,20 @@ Returns a result of the bitwise `or` operation of the two values. ## Returns Returns logical OR operation on a pair of numbers: value1 | value2. + +## Examples + +:::moniker range="azure-data-explorer" +> [!div class="nextstepaction"] +> Run the query +::: moniker-end + +```kusto +print result = binary_or(5, 3) +``` + +**Output** + +| result | +|--------| +| 7 | \ No newline at end of file diff --git a/data-explorer/kusto/query/binary-shift-left-function.md b/data-explorer/kusto/query/binary-shift-left-function.md index 8e561fb6f0..554dac4479 100644 --- a/data-explorer/kusto/query/binary-shift-left-function.md +++ b/data-explorer/kusto/query/binary-shift-left-function.md @@ -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 binary shift left operation on a pair of numbers. +Performs a binary shift left operation on a pair of numbers. ## Syntax @@ -29,7 +29,7 @@ Returns binary shift left operation on a pair of numbers. Returns binary shift left operation on a pair of numbers: value << (shift%64). If n is negative, a NULL value is returned. -## Example +## Examples :::moniker range="azure-data-explorer" > [!div class="nextstepaction"] diff --git a/data-explorer/kusto/query/binary-shift-right-function.md b/data-explorer/kusto/query/binary-shift-right-function.md index aee102b0fb..76fb7daa49 100644 --- a/data-explorer/kusto/query/binary-shift-right-function.md +++ b/data-explorer/kusto/query/binary-shift-right-function.md @@ -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 binary shift right operation on a pair of numbers. +Performs a binary shift right operation on a pair of numbers. ## Syntax diff --git a/data-explorer/kusto/query/binary-xor-function.md b/data-explorer/kusto/query/binary-xor-function.md index c30c997745..753ed7d2a5 100644 --- a/data-explorer/kusto/query/binary-xor-function.md +++ b/data-explorer/kusto/query/binary-xor-function.md @@ -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 a result of the bitwise `xor` operation of the two values. +Performs a bitwise `xor` operation on two values. ## Syntax diff --git a/data-explorer/kusto/query/cot-function.md b/data-explorer/kusto/query/cot-function.md index 6f3e1173e2..9f6e7a8fe9 100644 --- a/data-explorer/kusto/query/cot-function.md +++ b/data-explorer/kusto/query/cot-function.md @@ -27,7 +27,7 @@ Calculates the trigonometric cotangent of the specified angle, in radians. The cotangent function value for *number*. -## Example +## Examples :::moniker range="azure-data-explorer" > [!div class="nextstepaction"] diff --git a/data-explorer/kusto/query/count-aggregation-function.md b/data-explorer/kusto/query/count-aggregation-function.md index 0c6ef0b371..744f85ddef 100644 --- a/data-explorer/kusto/query/count-aggregation-function.md +++ b/data-explorer/kusto/query/count-aggregation-function.md @@ -28,7 +28,7 @@ To only count records for which a predicate returns `true`, use [countif()](coun Returns a count of the records per summarization group, or in total if summarization is done without grouping. -## Example +## Examples The following example returns a count of events in states: diff --git a/data-explorer/kusto/query/count-distinct-aggregation-function.md b/data-explorer/kusto/query/count-distinct-aggregation-function.md index ee861be28f..e4b92dd6da 100644 --- a/data-explorer/kusto/query/count-distinct-aggregation-function.md +++ b/data-explorer/kusto/query/count-distinct-aggregation-function.md @@ -43,7 +43,7 @@ To count only records for which a predicate returns `true`, use the [count_disti Long integer value indicating the number of unique values of *expr* per summary group. -## Example +## Examples The following example shows how many types of storm events happened in each state. diff --git a/data-explorer/kusto/query/count-distinctif-aggregation-function.md b/data-explorer/kusto/query/count-distinctif-aggregation-function.md index f8715c3827..d763d5b7dc 100644 --- a/data-explorer/kusto/query/count-distinctif-aggregation-function.md +++ b/data-explorer/kusto/query/count-distinctif-aggregation-function.md @@ -42,7 +42,7 @@ If you only need an estimation of unique values count, we recommend using the le Integer value indicating the number of unique values of *expr* per summary group, for all records for which the *predicate* evaluates to `true`. -## Example +## Examples The following example shows how many types of death-causing storm events happened in each state. Only storm events with a nonzero count of deaths are counted. diff --git a/data-explorer/kusto/query/count-operator.md b/data-explorer/kusto/query/count-operator.md index 1fb33f76f6..92e74c65e9 100644 --- a/data-explorer/kusto/query/count-operator.md +++ b/data-explorer/kusto/query/count-operator.md @@ -9,7 +9,7 @@ ms.date: 01/15/2025 > [!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 records in the input record set. +Calculates the number of records in the input record set. ## Syntax @@ -28,7 +28,7 @@ Returns the number of records in the input record set. This function returns a table with a single record and column of type `long`. The value of the only cell is the number of records in *T*. -## Example +## Examples [!INCLUDE [help-cluster](../includes/help-cluster-note.md)] diff --git a/data-explorer/kusto/query/covariance-aggregation-function.md b/data-explorer/kusto/query/covariance-aggregation-function.md index b6165e30ef..08fc20fa61 100644 --- a/data-explorer/kusto/query/covariance-aggregation-function.md +++ b/data-explorer/kusto/query/covariance-aggregation-function.md @@ -36,7 +36,7 @@ The following formula is used: Returns the covariance value of *expr1* and *expr2*. -## Example +## Examples The example in this section shows how to use the syntax to help you get started. diff --git a/data-explorer/kusto/query/covariancep-aggregation-function.md b/data-explorer/kusto/query/covariancep-aggregation-function.md index df47a38972..6b4b75faff 100644 --- a/data-explorer/kusto/query/covariancep-aggregation-function.md +++ b/data-explorer/kusto/query/covariancep-aggregation-function.md @@ -34,7 +34,7 @@ The following formula is used: Returns the covariance value of *expr1* and *expr2*. -## Example +## Examples The example in this section shows how to use the syntax to help you get started. diff --git a/data-explorer/kusto/query/current-cluster-endpoint-function.md b/data-explorer/kusto/query/current-cluster-endpoint-function.md index fd0dce9625..ea2c246206 100644 --- a/data-explorer/kusto/query/current-cluster-endpoint-function.md +++ b/data-explorer/kusto/query/current-cluster-endpoint-function.md @@ -10,11 +10,11 @@ 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)] :::moniker range="azure-data-explorer || azure-monitor || microsoft-sentinel" -Returns the network endpoint (DNS name) of the current cluster being queried. +Provides the network endpoint (DNS name) of the current cluster being queried. ::: moniker-end :::moniker range="microsoft-fabric" -Returns the network endpoint (DNS name) of the current Eventhouse being queried. +Provides the network endpoint (DNS name) of the current Eventhouse being queried. ::: moniker-end ## Syntax @@ -26,14 +26,14 @@ Returns the network endpoint (DNS name) of the current Eventhouse being queried. ## Returns :::moniker range="azure-data-explorer || azure-monitor || microsoft-sentinel" -The network endpoint (DNS name) of the current cluster being queried, as a value of type `string`. +Returns the network endpoint (DNS name) of the current cluster being queried, as a value of type `string`. ::: moniker-end :::moniker range="microsoft-fabric" -The network endpoint (DNS name) of the current Eventhouse being queried, as a value of type `string`. +Returns the network endpoint (DNS name) of the current Eventhouse being queried, as a value of type `string`. ::: moniker-end -## Example +## Examples ```kusto print strcat("This query executed on: ", current_cluster_endpoint()) diff --git a/data-explorer/kusto/query/current-database-function.md b/data-explorer/kusto/query/current-database-function.md index 715fda4bc4..fc06c04bf0 100644 --- a/data-explorer/kusto/query/current-database-function.md +++ b/data-explorer/kusto/query/current-database-function.md @@ -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 name of the database in scope (database that all query +PRovides the name of the database in scope (database that all query entities are resolved against if no other database is specified). ## Syntax @@ -20,9 +20,9 @@ entities are resolved against if no other database is specified). ## Returns -The name of the database in scope as a value of type `string`. +Returns name of the database in scope as a value of type `string`. -## Example +## Examples ```kusto print strcat("Database in scope: ", current_database()) diff --git a/data-explorer/kusto/query/current-principal-details-function.md b/data-explorer/kusto/query/current-principal-details-function.md index 52f28337a2..9eb89a2b5a 100644 --- a/data-explorer/kusto/query/current-principal-details-function.md +++ b/data-explorer/kusto/query/current-principal-details-function.md @@ -9,7 +9,7 @@ ms.date: 11/03/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 details of the principal running the query. +Provides details of the principal running the query. ## Syntax @@ -19,7 +19,7 @@ Returns details of the principal running the query. ## Returns -The details of the current principal as a [dynamic](../query/scalar-data-types/dynamic.md). The following table describes the returned fields. +Returns the details of the current principal as a [dynamic](../query/scalar-data-types/dynamic.md). The following table describes the returned fields. |Field|Description| |--|--| @@ -35,7 +35,7 @@ The details of the current principal as a [dynamic](../query/scalar-data-types/d |TenantCountry|The resource tenant's country or region, set at a tenant level by an admin. This property is returned if the information is present. The value is a standard two-letter country or region code, for example, FR, JP, and SZ. | |TenantRegion|The region of the resource tenant. This property is returned if the information is present. The value is a standard two-letter country or region code, for example, FR, JP, and SZ. | -## Example +## Examples :::moniker range="azure-data-explorer" > [!div class="nextstepaction"] @@ -46,7 +46,7 @@ The details of the current principal as a [dynamic](../query/scalar-data-types/d print details=current_principal_details() ``` -**Example output** +**Output** |details| |---|