如何拉出子字符串的特定部分并从中创建列

发布于 2025-02-10 05:22:23 字数 315 浏览 2 评论 0原文

因此,我在Grafana工作,并与KQL一起建造一张桌子。目前,我是一个很重要的原因,我的数据集之一是一堆荒谬的字符串,我需要在多个不同的斑点上拉非常具体的部分并将其放入列中。我有“ ........'1231249'..........'父母'........'412348'.....'继任者'。 ...“我需要完全忽略字符串的所有额外部分,只将数字拉到基于短语的列中,以便最终结果看起来像:

parent | 继任者

1231249 | 412348

注意该字符串来自从Azure导入的表。 也很抱歉我无知,我是KQL的新手

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

寒冷纷飞旳雪 2025-02-17 05:22:23

parse> parse> parse 操作

print col = "....... '1231249'.........'parent'........'412348'.....'successor'...."
| parse col with * "'" parent:long * "'" successor:long *
col父母
... ....'1231249'..........'parent'........'412348'.....'连续'....1231249412348

fiddle

parse operator

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

Fiddle

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文