Trying to write a KQL query where results should come when the table column Rawdata either contains any of the strings – job1 or job2 :-
Tablename
| where RawData contains "JOB1" OR "JOB2"
The above gives me errror, what is the right way to do it
2
Answers
The right way to do it:
If "JOB1" and "JOB2" is a term then you can use the operator has_any
https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/datatypes-string-operators#what-is-a-term
You can also use
in()
if you want to search through rows.In this case, the entire row of the column must match the given word, then only it will give the required output.
Demo:
If you want to get the results by matching certain words in the row, then you can use regex.
Demo: