Skip to content

Commit

Permalink
Merge pull request #2459 from MicrosoftDocs/main638683923700944553syn…
Browse files Browse the repository at this point in the history
…c_temp

For protected branch, push strategy should use PR and merge to target branch method to work around git push error
  • Loading branch information
learn-build-service-prod[bot] authored Nov 28, 2024
2 parents 92d14f3 + 26ae82f commit 6c87088
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions data-explorer/kusto/query/in-cs-operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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"]
> <a href="https://dataexplorer.azure.com/clusters/help/databases/Samples?query=H4sIAAAAAAAAA22PPQuDMBCG9/yKFxcVXJ3EpdCt0EF3sfaqKZpIPEst/vhGpVZqs+Tg7nk/amKcZFmxkqrMDkOWcM6EGI39jMxr+SIvYW2a44MUdwL2jej6psmN3aFeYZoPLFroXrG8eTORDq2Vi+GuLq6Py4DZx49EbQOkus3CxXni/+QZwbpFOIE7wxGt0XcqeNGMIPYCYgQ9mdQVn37SBlxmqeBtE/jBchTAOXNFxvHFtrCdvN8M30ZvE2wmM1ABAAA=" target="_blank">Run the query</a>
Expand Down Expand Up @@ -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"]
> <a href="https://dataexplorer.azure.com/clusters/help/databases/Samples?query=H4sIAAAAAAAAAwsuyS/KdS1LzSspVuCqUSjPSC1KVQguSSxJVcjMU9DwzCsBChSXZOalgwWLNTQ1QeqS80vzSgAtnqHrPAAAAA==" target="_blank">Run the query</a>
Expand All @@ -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"]
Expand All @@ -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)

0 comments on commit 6c87088

Please sign in to comment.