Create stored function with parameter

New Contributor



As the title states... Is this possible with Log analytics now? I found this documentation:


But when I try to run the command in Kusto it doesn't work and gives me this error: 

Query could not be parsed at '.' on line [1,0] Token: . Line: 1 Position: 0


Do I need to create Azure data explorer resource and run it from there? Or is this a bug in Log analytics?


Thanks! :) 

5 Replies
best response confirmed by oOMelon (New Contributor)

@oOMelon  this feature isn't supported in Log Analytics yet, but is planned to be implemented in the coming months.

Generally speaking, control commands (listed under the management section of the kusto documentation tree) are not supported in Log Analytics, it will be done in another way.


@Noa Kuperberg Thank you very much for the answer! Much appreciated :)

Hi @Noa,


Is this feature - saving function with parameter support - avaiable now?
If not, could you please share expected timeline?



Hi @Vino55,

The feature is avaialbe, but there's no UI at this point. It be set through ARM and used in queries. See this for more details. 

@Noa Kuperberg 
Functions with parameter can be called in the query editor in the portal as expected with function_name(param1,param2)
Currently the portal offers the possibility to copy the link to the query. Is it possible to pass the parameters in the query link (similar to what you have today for the timespan when you specify the time range - e.g. <link to query>/timespan/P1D). If not - are there any plans to support this in the future ? This would  be very helpful for directly filtering the log results with the given parameters.
Thank you in advance,
bye //emil.