Why do I get error for cross querying in Kusto

Heidi Zhang 0 Reputation points Microsoft Employee

I can run my function successfully in local cluster but get errors while running in other clusters:

Errors occurred while resolving remote entities. Cluster='https://dummy.kusto.windows.net/', Database='DummyDB': Semantic error: Schema of the stored function 'AllMgmtSmsAccountTrace' expected to be constant and not to depend on input arguments or data. Error details: SEM0001: evaluate execute_query(): the following error(s) occurred while evaluating the output schema: evaluate execute_query() is not allowed in this context.

Example of my query


| take 10

Azure Data Explorer
Azure Data Explorer
An Azure data analytics service for real-time analysis on large volumes of data streaming from sources including applications, websites, and internet of things devices.
487 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sander van de Velde 29,616 Reputation points MVP

    Hello @Heidi Zhang ,

    welcome to this moderated Azure community forum.

    I tried to replicate your example:

    | take 5

    I was based on an existing stored function:

    User's image

    Notice I added round brackets '()' at the end, after the function name.

    This gives a correct result:

    User's image

    Can you add the round brackets and check your query again?

    If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.