From 299648ff4ca30ab49b84d60a0c5a45dbd7235a57 Mon Sep 17 00:00:00 2001 From: Meira Josephy <144697924+mjosephym@users.noreply.github.com> Date: Wed, 27 Nov 2024 16:10:39 +0200 Subject: [PATCH] removed note, edits --- data-explorer/kusto/query/in-cs-operator.md | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/data-explorer/kusto/query/in-cs-operator.md b/data-explorer/kusto/query/in-cs-operator.md index 004a99fd0c..5a3ba36708 100644 --- a/data-explorer/kusto/query/in-cs-operator.md +++ b/data-explorer/kusto/query/in-cs-operator.md @@ -3,7 +3,7 @@ title: The case-sensitive in string operator description: Learn how to use the in operator to filter data with a case-sensitive string. ms.reviewer: alexans ms.topic: reference -ms.date: 08/11/2024 +ms.date: 11/27/2024 --- # in operator @@ -31,10 +31,7 @@ Filters a record set for data with a case-sensitive string. |--|--|--|--| | *T* | `string` | :heavy_check_mark: | The tabular input to filter.| | *col* | `string` | :heavy_check_mark: | The column by which to filter.| -| *expression* | scalar or tabular | :heavy_check_mark: | An expression that specifies the values for which to search. the values for which to search. Each expression can be a [scalar](scalar-data-types/index.md) value or a [tabular expression](tabular-expression-statements.md) that produces a set of values. If a tabular expression has multiple columns, the first column is used. The search will consider up to 1,000,000 distinct values.| - -> [!NOTE] -> An inline tabular expression must be enclosed with double parentheses. See [example](#tabular-expression). +| *expression* | scalar or tabular | :heavy_check_mark: | An expression that specifies the values for which to search. Each expression can be a [scalar](scalar-data-types/index.md) value or a [tabular expression](tabular-expression-statements.md) that produces a set of values. If a tabular expression has multiple columns, the first column is used. The search considers up to 1,000,000 distinct values.| ## Returns @@ -129,6 +126,8 @@ StormEvents ### Top with other example +The following example identifies the top five states with lightning events and uses the `iff()` function and `in` operator to classify lightning events by the top five states, labeled by state name, and all others labeled as "Other." + :::moniker range="azure-data-explorer" > [!div class="nextstepaction"] > Run the query @@ -156,6 +155,8 @@ Lightning_By_State ### Use a static list returned by a function +The following example counts events from the `StormEvents` table based on a predefined list of interesting states. The interesting states are defined by the `InterestingStates()` function. + :::moniker range="azure-data-explorer" > [!div class="nextstepaction"] > Run the query @@ -173,7 +174,7 @@ StormEvents |---| |4775| -The function definition. +The following query displays which states are considered interesting by the `InterestingStates()` function. :::moniker range="azure-data-explorer" > [!div class="nextstepaction"] @@ -189,3 +190,11 @@ The function definition. |Name|Parameters|Body|Folder|DocString| |---|---|---|---|---| |InterestingStates|()|{ dynamic(["WASHINGTON", "FLORIDA", "GEORGIA", "NEW YORK"]) } + +## Related content + +* [in~ operator](in-operator.md) +* [!in~ operator](not-in-operator.md) +* [!in operator](not-in-cs-operator.md) +* [contains_cs operator](contains-cs-operator.md) +* [has_cs operator](has-cs-operator.md)