Skip to content

Commit 17e1739

Browse files
committed
Review
1 parent d581f4e commit 17e1739

File tree

1 file changed

+22
-16
lines changed

1 file changed

+22
-16
lines changed

articles/data-lake-analytics/data-lake-analytics-u-sql-develop-with-python-r-csharp-in-vscode.md

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,29 @@ ms.date: 11/22/2017
88
ms.custom: devx-track-python
99
---
1010
# Develop U-SQL with Python, R, and C# for Azure Data Lake Analytics in Visual Studio Code
11+
1112
Learn how to use Visual Studio Code (VSCode) to write Python, R and C# code behind with U-SQL and submit jobs to Azure Data Lake service. For more information about Azure Data Lake Tools for VSCode, see [Use the Azure Data Lake Tools for Visual Studio Code](data-lake-analytics-data-lake-tools-for-vscode.md).
1213

1314
Before writing code-behind custom code, you need to open a folder or a workspace in VSCode.
1415

1516
## Prerequisites for Python and R
17+
1618
Register Python and, R extensions assemblies for your ADL account.
1719
1. Open your account in portal.
1820
- Select **Overview**.
19-
- Click **Sample Script**.
20-
2. Click **More**.
21+
- Select **Sample Script**.
22+
2. Select **More**.
2123
3. Select **Install U-SQL Extensions**.
2224
4. Confirmation message is displayed after the U-SQL extensions are installed.
2325

24-
![Set up the environment for Python and R](./media/data-lake-analytics-data-lake-tools-for-vscode/setup-the-enrionment-for-python-and-r.png)
26+
:::image type="content" source="./media/data-lake-analytics-data-lake-tools-for-vscode/setup-the-enrionment-for-python-and-r.png" alt-text="Screenshots showing selecting Sample Scripts in Overview, selecting More and Install U-SQL Extensions." lightbox="./media/data-lake-analytics-data-lake-tools-for-vscode/setup-the-enrionment-for-python-and-r.png":::
2527

2628
> [!Note]
2729
> For best experiences on Python and R language service, please install VSCode Python and R extension.
2830
2931
## Develop Python file
30-
1. Click the **New File** in your workspace.
32+
33+
1. Select the **New File** in your workspace.
3134
2. Write your code in U-SQL. The following is a code sample.
3235
```U-SQL
3336
REFERENCE ASSEMBLY [ExtPython];
@@ -48,7 +51,7 @@ Register Python and, R extensions assemblies for your ADL account.
4851
TO "/tweetmentions.csv"
4952
USING Outputters.Csv();
5053
```
51-
54+
5255
3. Right-click a script file, and then select **ADL: Generate Python Code Behind File**.
5356
4. The **xxx.usql.py** file is generated in your working folder. Write your code in Python file. The following is a code sample.
5457
@@ -63,10 +66,11 @@ Register Python and, R extensions assemblies for your ADL account.
6366
del df['tweet']
6467
return df
6568
```
66-
5. Right-click in **USQL** file, you can click **Compile Script** or **Submit Job** to running job.
69+
5. Right-click in **USQL** file, you can select **Compile Script** or **Submit Job** to running job.
6770
6871
## Develop R file
69-
1. Click the **New File** in your workspace.
72+
73+
1. Select the **New File** in your workspace.
7074
2. Write your code in U-SQL file. The following is a code sample.
7175
```U-SQL
7276
DEPLOY RESOURCE @"/usqlext/samples/R/my_model_LM_Iris.rda";
@@ -113,12 +117,13 @@ Register Python and, R extensions assemblies for your ADL account.
113117
load("my_model_LM_Iris.rda")
114118
outputToUSQL=data.frame(predict(lm.fit, inputFromUSQL, interval="confidence"))
115119
```
116-
5. Right-click in **USQL** file, you can click **Compile Script** or **Submit Job** to running job.
120+
5. Right-click in **USQL** file, you can select **Compile Script** or **Submit Job** to running job.
117121
118122
## Develop C# file
123+
119124
A code-behind file is a C# file associated with a single U-SQL script. You can define a script dedicated to UDO, UDA, UDT, and UDF in the code-behind file. The UDO, UDA, UDT, and UDF can be used directly in the script without registering the assembly first. The code-behind file is put in the same folder as its peering U-SQL script file. If the script is named xxx.usql, the code-behind is named as xxx.usql.cs. If you manually delete the code-behind file, the code-behind feature is disabled for its associated U-SQL script. For more information about writing customer code for U-SQL script, see [Writing and Using Custom Code in U-SQL: User-Defined Functions]( https://blogs.msdn.microsoft.com/visualstudio/2015/10/28/writing-and-using-custom-code-in-u-sql-user-defined-functions/).
120125
121-
1. Click the **New File** in your workspace.
126+
1. Select the **New File** in your workspace.
122127
2. Write your code in U-SQL file. The following is a code sample.
123128
```U-SQL
124129
@a =
@@ -167,12 +172,13 @@ A code-behind file is a C# file associated with a single U-SQL script. You can d
167172
}
168173
}
169174
```
170-
5. Right-click in **USQL** file, you can click **Compile Script** or **Submit Job** to running job.
175+
5. Right-click in **USQL** file, you can select **Compile Script** or **Submit Job** to running job.
171176
172177
## Next steps
173-
* [Use the Azure Data Lake Tools for Visual Studio Code](data-lake-analytics-data-lake-tools-for-vscode.md)
174-
* [U-SQL local run and local debug with Visual Studio Code](data-lake-tools-for-vscode-local-run-and-debug.md)
175-
* [Get started with Data Lake Analytics using PowerShell](data-lake-analytics-get-started-powershell.md)
176-
* [Get started with Data Lake Analytics using the Azure portal](data-lake-analytics-get-started-portal.md)
177-
* [Use Data Lake Tools for Visual Studio for developing U-SQL applications](data-lake-analytics-data-lake-tools-get-started.md)
178-
* [Use Data Lake Analytics(U-SQL) catalog](./data-lake-analytics-u-sql-get-started.md)
178+
179+
- [Use the Azure Data Lake Tools for Visual Studio Code](data-lake-analytics-data-lake-tools-for-vscode.md)
180+
- [U-SQL local run and local debug with Visual Studio Code](data-lake-tools-for-vscode-local-run-and-debug.md)
181+
- [Get started with Data Lake Analytics using PowerShell](data-lake-analytics-get-started-powershell.md)
182+
- [Get started with Data Lake Analytics using the Azure portal](data-lake-analytics-get-started-portal.md)
183+
- [Use Data Lake Tools for Visual Studio for developing U-SQL applications](data-lake-analytics-data-lake-tools-get-started.md)
184+
- [Use Data Lake Analytics(U-SQL) catalog](./data-lake-analytics-u-sql-get-started.md)

0 commit comments

Comments
 (0)