简体   繁体   English

Azure 数据资源管理器/Kusto JSON 摄取转换 (GetPathElement)

[英]Azure Data Explorer / Kusto JSON Ingestion Transform (GetPathElement)

I have some troubles understanding the ingestion of JSON entries (from Event Hubs) into Kusto / ADX.我在理解将 JSON 条目(来自事件中心)摄取到 Kusto/ADX 时遇到了一些麻烦。 I seem not to be able to get the GetPathElement transform statement to work.我似乎无法让 GetPathElement 转换语句起作用。 I'd expected that something like我原以为是这样的

[{"test":"name","path":"$.content.something","transform":"GetPathElement(0)"}] [{"test":"name","path":"$.content.something","transform":"GetPathElement(0)"}]

would work (according to documentation).会工作(根据文档)。 Unfortunately, I get the (imo) undocumented error:不幸的是,我收到了(imo)未记录的错误:

Value 'GetPathElement(0)' used in a switch/case is invalid开关/案例中使用的值“GetPathElement(0)”无效

Can someone give me a hint/example on how GetPathElement should work?有人可以给我一个关于 GetPathElement 应该如何工作的提示/示例吗?

can you share your ingest statement.你能分享一下你的摄取声明吗?

also you can do a 1-click ingestion which, do not complete the setup but just point it to the JSON file and it will give you an ingest commands to run with Table schema commands and etc which you can then run in kusto explorer or through Azure Portal.您也可以进行一键摄取,不完成设置,只需将其指向 JSON 文件,它将为您提供摄取命令以使用表模式命令等运行,然后您可以在 kusto explorer 或通过Azure 门户。

https://docs.microsoft.com/en-us/azure/data-explorer/ingest-data-one-click https://docs.microsoft.com/en-us/azure/data-explorer/ingest-data-one-click

This transformation option indeed doesn't work.这种转换选项确实不起作用。 I am not sure this transformation meant to do what you are expecting from it.我不确定这种转变是否意味着做你对它的期望。 If it had worked correction, it would put the constant word 'something' to each ingested row.如果它进行了更正,它会将常量词“某物”放在每个摄取的行中。 Is this what you meant to get?这是你想得到的吗? If yes, you can use 'ConstValue' property of the mapping.如果是,您可以使用映射的“ConstValue”属性。 If you mean anything different, please, explain in more details.如果您的意思有任何不同,请更详细地解释。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM