How to pull specific parts of substrings and create columns from it

Viewed 75

So I'm working in Grafana and building out a table with KQL. Currently I'm a stumped cause one of my data sets is a bunch of strings that are ridiculously long and I need to pull very specific portions in multiple different spots and fit it into columns. I've got strings that are "....... '1231249'.........'parent'........'412348'.....'successor'...." I need to completely ignore all the extra portions of the string and only pull the numbers and get them into columns based off the phrases so an end result would look something like:

parent | successor

1231249 | 412348

Note the string is from a table that's been imported in from Azure. Also sorry for just being clueless I am brand new to KQL

1 Answers

parse operator

print col = "....... '1231249'.........'parent'........'412348'.....'successor'...."
| parse col with * "'" parent:long * "'" successor:long *
col parent successor
....... '1231249'.........'parent'........'412348'.....'successor'.... 1231249 412348

Fiddle

Related