azure-kusto-python icon indicating copy to clipboard operation
azure-kusto-python copied to clipboard

Support for running python UDF?

Open selvavm opened this issue 2 years ago • 4 comments

I would like to run temporary Python UDF using this client. Is it possible?

My use case includes a complex python app which should execute queries and python UDF, something similar to pyspark. Snowflake has this support using Snowpark. In Snowpark, the python UDF is staged in a server location and then executed in Snowflake server with a simple dataframe API (internally the dataframe is converted to a Snowflake query and executed). Can we have something similar here?

We can use inspect.getsource() as mentioned in docs

selvavm avatar Oct 03 '22 17:10 selvavm

Have you checked Python plugin? The Python plugin runs a user-defined function (UDF) using a Python script. https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/pythonplugin?pivots=azuredataexplorer

anshulsharmas avatar Oct 18 '22 12:10 anshulsharmas

Thanks and yes. But I wanted to pass a function to the azure-kusto-python and wanted it to transform that as a query rather than I create a query in string format.

selvavm avatar Oct 21 '22 10:10 selvavm

We can consider this after adding KQL statement support, as in Go

yogilad avatar Mar 19 '23 12:03 yogilad

@selvavm can you please elaborate your scenario with an example?

anshulsharmas avatar Mar 20 '23 01:03 anshulsharmas