Forum Discussion
gfeng
Aug 12, 2022Copper Contributor
KQL "externaldata" operator fail
KQL code as follow:
let ipdetail=(ip:string) {
let mydetail=externaldata(detail:string )[h@myurl]with(format="raw");
mydetail
};
print ipdetail("18.140.16.195")
It fails with:
“Failed to parse the query, no additional information is available. If the issue persists, please open a support ticket. Request id: 7c040878-08b5-4ccc-9154-9f5ece20d362”
Anyone know the reason?
- Clive_WatsonBronze Contributor
I'm not sure that will do what you need. You can build the string this way
let ipdetail= (ip:string) { strcat('externaldata(detail:string )[h@"', strcat("https://ipapi.co/",ip,'/json'),'"]with(format="raw")') };
print ipdetail("18.140.16.195")
However the result is the string you built not the result of the execution of the externaldata operator