Azure Data Explorer supports running Python code embedded in Kusto query language using the python() plugin. The plugin runtime is hosted in a sandbox, an isolated and secure Python environment. The python() plugin capability extends KQL (Kusto Query Language) native functionalities with the huge archive of OSS Python packages. This extension enables you to run advanced algorithms, such as ML, AI, statistical, and Time Series Analysis as part of the query.
KQL tools aren't convenient for developing and debugging Python algorithms. Therefore, the best practice is to develop the algorithm on your favorite Python IDE such as Jupyter, PyCharm, VS, or VS Code. When the algorithm is complete, copy and paste the python code into KQL. To improve and streamline this workflow, Azure Data Explorer supports integration between Kusto Explorer or Web UI clients and VS Code for authoring and debugging KQL inline Python code.
set query_python_debug; range x from 1 to 4 step 1 | evaluate python(typeof(*, x4:int), 'exp = kargs["exp"]\n' 'result = df\n' 'result["x4"] = df["x"].pow(exp)\n' , pack('exp', 4))
For further information see the full documentation
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.