How to get all the data from column in conditional statement using KQL in Workbook

Preet Parikh 1 Reputation point
2022-05-20T06:34:20.827+00:00

I am using kql query

name_of_log_table
| where abc has "103.90.06.102"
| where pqr == "def"
| project ip

to get specific ip address from log table from the column name abc but now i want to get all the data from that column abc using

name_of_log_table
| where abc has "*"
| where pqr == "def"
| project ip

But i am not able to get it as, * will be considered as null

so how can i get all the data of abc column

Note:- we are passing value of column abc through parameter so the line must be there
FYI the query looks like this

name_of_log_table
| where abc has '{param1}'
| where pqr == '{param2}'
| project ip

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
2,820 questions
Microsoft Sentinel
Microsoft Sentinel
A scalable, cloud-native solution for security information event management and security orchestration automated response. Previously known as Azure Sentinel.
989 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Clive Watson 5,716 Reputation points MVP
    2022-05-20T08:21:39.103+00:00

    In your Parameter tick the allow multiple selection then you can specify an "all" value and a default such as "all" or "*"

    204025-image.png

    203997-image.png

    You are then able to to check the label for the value or the data you passed from the parameter.

    | where "{LogSeverity:label}" == "All" or LogSeverity in ({LogSeverity})

    An example, look at the 'Product Name' or 'Owner Parmenter' https://github.com/Azure/Azure-Sentinel/blob/96245e4d59fa4d32f69b56efbffa3cf579683344/Workbooks/SentinelCentral.json


  2. Clive Watson 5,716 Reputation points MVP
    2022-05-20T12:30:57.597+00:00

    That quite an edge case, if you dont select any Parmenter the method I showed - displays "The query could not run because some parameters are not set" - users typically understand they have to select at least one thing. If the default item is "all" its less likely that they wont tick something.

    You could look to see if a CRITERIA rather than a JSON or Logs query could help, or setting a dynamic empty variable for the array.

    0 comments No comments