From KQL
Synopsis
Azure Sentinel ships its normalization logic as ASIM parsers — a KQL function, wrapped in a YAML file that carries it under a ParserQuery or Query field. Conversion reads that export, or a raw KQL reduction query of the form SourceTable | where ... | extend ... | project ..., and returns a native DataStream pipeline.
You can supply either the full ASIM parser YAML export, in which case the query and the parser name are extracted automatically, or the KQL text on its own.
Do not hand-translate a KQL query. Run the conversion from the create wizard's
This Is Not Federated Search
DataStream uses KQL in two unrelated ways, and it is worth being precise about which one this page describes.
Federated Search runs KQL as a query language. You write a query, and DataStream executes it against your data at query time.
Conversion, described here, treats KQL as a source format. The query is translated once, at import, into a DataStream pipeline — and then it is gone. Nothing about KQL survives into pipeline execution; the result is ordinary YAML that runs like any other pipeline.
The two are complementary rather than overlapping. The operators conversion cannot express — summarize, join, sort, and the rest of the aggregation family — are precisely the ones Federated Search exists to run, because they describe work across a set of events rather than work on a single event.
What Converts
Pipe Operators
| KQL operator | DataStream processor | Notes |
|---|---|---|
where | Drop | The condition is negated: events that fail it are dropped. An ASIM where not(disabled) guard is recognized and skipped. |
extend | Varies | Each assignment is lowered by its value expression. See Scalar Functions. |
project | Keep | Computed columns are emitted first, then the field list is kept. |
project-keep | Keep | |
project-away | Remove | A suffix wildcard that matches no known field is kept verbatim, with a warning. |
project-rename | Rename | |
project-reorder | None | A no-op, with a warning. Field order is not significant in a per-event pipeline. |
parse | Dissect or Grok | Dissect for a pure delimiter pattern, Grok when the captures are typed. |
parse-kv | KV | |
lookup | Lookup | Each referenced datatable is registered as inline lookup_content. An unreferenced datatable is pruned. |
union | Group | Each branch becomes a group with its own condition. An event matching no branch is dropped, as in KQL. |
invoke | Varies | See ASIM Helpers. |
Scalar Functions
| KQL function | DataStream processor |
|---|---|
Literals, bare field references, strcat, strcat_delim, concat, column_ifexists | Set |
coalesce | Coalesce |
case, iif, iff | Case |
Arithmetic (+, -, *, /, %) | Math |
tostring, toint, tolong, todouble, toreal, todecimal, tobool, toboolean, todatetime, and the int(), long(), real(), double() literal casts | Convert |
unixtime_seconds_todatetime, unixtime_milliseconds_todatetime | Date |
toupper | Uppercase |
tolower | Lowercase |
trim, trim_start, trim_end | Trim |
replace_string, replace_regex | Gsub |
extract | Grok |
split | Split |
strcat_array | Join |
array_slice | Slice |
Array indexing, such as arr[0] | Select |
substring | Substring |
todynamic, toobject, parse_json | JSON |
bag_pack, pack, pack_dictionary | Bag Pack |
base64_encode_tostring, encode_base64, base64_encodestring | Base64 Encode |
base64_decode_tostring, decode_base64, base64_decodestring | Base64 Decode |
parse_url, parse_urlquery | URI Parts |
url_decode | URL Decode |
parse_ipv4, parse_ipv6, ipv4_is_private | IP Type |
hash_sha256, hash_md5, hash_sha1 | Fingerprint |
parse_user_agent, user_agent | User Agent |
The totimespan(F)/time(1s) duration-ratio idiom | Duration |
Any other function becomes a Comment carrying the original KQL expression, with a warning.