Share via

U-SQL Advanced Analytics: Introducing Python Extensions for U-SQL

Last week at Microsoft's Connect 2016 conference, we announced the General Availability of Azure Data Lake Analytics. As part of the announcement we revealed that U-SQL now includes built-in support for Advanced Analytics scenarios. This includes:

  • The ability to perform massively distributed analytics using Python
  • The ability to perform massively distributed analytics using R
  • Built-in Cognitive capabilities (such as image object detection, sentiment analysis, etc.)

In this post we'll give a very brief overview of the Python support. We'll publish additional blog posts that cover R and the Cognitive scenarios later this week. Below is a very simple "Hello World" using Python that illustrates how easy we've made it to use Python with U-SQL. This is the simplest script that demonstrates how you can run Python on vertexes using a special built-in Python Reducer.  This script shows the key steps:

  1. using REFERENCE ASSEMBLY to bring in the needed Python support
  2. using REDUCE to partition the input data on a key
  3. a built-in reducer (Extension.Python.Reducer) that runs Python code on each vertex assigned to the reducer
  4. Embedded Python code in the U-SQL script that accepts a pandas DataFrame as input and returns a pandas DataFrame as output.


To see an simple Hello World sample, go here:

To learn more about our support for U-SQL Advanced Analytics and how to enable it in your Data Lake Analytics Accounts, see our Getting Started guide .