0
votes

Does usql python extension support sci-kitlearn library? The webpage https://docs.microsoft.com/en-us/azure/data-lake-analytics/data-lake-analytics-u-sql-python-extensions mention only numpy, pandas, numexpr.

If not, how can we import the external library? is there a way to include import statement in the script?

1
Hi,does my answer helps you?Jay Gong
Hi,does my answer helps you?Any progress now?Jay Gong
Hi Jay Gong, Thanks for your reply. We didnt get a chance to verify the same since we took an alternative method of running python code using azure batch service. Apparently we decided so, since the running the simple python code for a small dataset from USQL was very slow.Learner

1 Answers

1
votes

If not, how can we import the external library? is there a way to include import statement in the script?

Based on my research, it is possible but it requires following a few steps:

  1. Create a zip file to hold you modules.
  2. Upload the zip to Azure Data Lake
  3. In your U-SQL script: use DEPLOY RESOURCE to make the zip available to your U-SQL code.
  4. In your Python code that is used by the U-SQL script. Modify sys.path to include the zip

More details related to the steps, please refer to this doc.