How to pass urlparam value to KQL

You need to remove the whole piped | var ... function on line 3, because it is returning a string type that essql can't take.