You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Kusto使用externaldata算子访问AWS官方IP范围接口时异常报错

问题原因

  • 报错的核心是Kusto的externaldata算子处理外部资源时,无法获取到合法的文件名标识,触发了内部参数空校验逻辑,抛出Argument 'name' is null异常。
  • AWS官方的https://ip-ranges.amazonaws.com/ip-ranges.json接口返回的响应头中,Content-Disposition字段未携带标准的filename参数,同时Kusto的路径解析逻辑对该域名的URL解析异常,最终得到的文件名为空,触发报错。
  • 你托管在GitHub Raw上的同内容文件,响应头包含标准的Content-Disposition: attachment; filename=ip-ranges.json字段,Kusto可以正常提取到文件名,因此查询可以正常运行。

解决方法

无需更换数据源,只需在AWS官方地址末尾添加一个无意义的查询参数,强制Kusto识别文件名即可。AWS的该接口会忽略未定义的查询参数,不会影响数据返回,修改后的查询如下:

externaldata(syncToken:string, createDate:string, prefixes: dynamic , ipv6_prefixes: dynamic)
[ 
    h@'https://ip-ranges.amazonaws.com/ip-ranges.json?filename=ip-ranges.json'
]
with(format= 'multijson', ingestionMapping=
'[{"Column":"syncToken","Properties":{"Path":"$.syncToken"}},' 
'{"Column":"createDate","Properties":{"Path":"$.createDate"}},' 
'{"Column":"prefixes","Properties":{"Path":"$.prefixes"}},'
'{"Column":"ipv6_prefixes","Properties":{"Path":"$.ipv6_prefixes"}}]')

内容的提问来源于stack exchange,提问作者user3085957

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.10.04 13:57:01