Install Azure U-SQL Extensions to run R/Python scripts locally?

后端 未结 1 1001
攒了一身酷
攒了一身酷 2021-01-03 16:27

We can extend U-SQL scripts with R/Python code in Azure Data Lake Analytics, but how can we do it locally?

1条回答
  •  萌比男神i
    2021-01-03 17:03

    1. Install U-SQL Advanced Analytics extensions in your Data Lake Analytics Account
      1.1 Launch your Azure Portal
      1.2 Navigate to your Data Lake Analytics Account
      1.3 Click Sample Scripts
      1.4 Click More and select Install U-SQL Extensions
      1.5 Wait until the extensions have finished installing (2GB)
      1.6 Have you waited? Then go to your Data Lake Analytics Account
      1.7 Navigate to your default Data Lake Store Account
      1.8 Click on Data Explorer and verify that a folder /usqlext exists

    2. Get your USQL Local Run path
      2.1 Launch your Visual Studio
      2.2 Select Tools > Options > Azure Data Lake > General
      2.3 Under U-SQL Local Run, find and copy the value for DataRoot
      2.4 The value will look like this: C:\Users\username\AppData\Local\USQLDataRoot

    3. Copy U-SQL Advanced Analytics extensions from Azure to your localhost
      3.1 Use a powershell script or ... go to the next line
      3.2 Launch Microsoft Azure Storage Explorer (great tool, install it)
      3.3 Locate your default Data Lake Store, the one of your Data Lake Analytics Account
      3.4 Open data explorer and Download the folder /usqlext to your USQL Local Run's path
      3.5 The full path should look like this: C:\Users\username\AppData\Local\USQLDataRoot\usqlext

    4. Final step, register all Azure U-SQL Extensions under U-SQL Local Run
      4.1 Launch your Visual Studio
      4.2 Start a new U-SQL project
      4.3 Open the file C:\Users\username\AppData\Local\USQLDataRoot\usqlext\RegisterAll.usql
      4.4 Copy the text into your own U-SQL script
      4.5 Run it in Local Execution mode
      4.6 Once the script finishes...

    You will be able to use all the U-SQL Advanced Analytics features (Python, R, Cognitive) on your own machine and explore all the samples in \usqlext\samples!

    Have a nive day!

    0 讨论(0)
提交回复
热议问题