You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/stream-analytics/quick-create-visual-studio-code.md
+17-17Lines changed: 17 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,7 +90,7 @@ Before you define the Stream Analytics job, you should prepare the data that's l
90
90
2. Replace the placeholder in line 15 with the IoT hub device connection string that you saved earlier.
91
91
3. Select **Run**. The output should show the sensor data and messages that are being sent to your IoT hub.
92
92
93
-

93
+
:::image type="content" source="./media/quick-create-visual-studio-code/ras-pi-connection-string.png" lightbox="./media/quick-create-visual-studio-code/ras-pi-connection-string.png" alt-text="Screenshot showing the Raspberry Pi Azure IoT Online Simulator with output.":::
94
94
95
95
## Create blob storage
96
96
@@ -139,26 +139,26 @@ Before you define the Stream Analytics job, you should prepare the data that's l
139
139
WHERE Temperature >27
140
140
```
141
141
142
-
:::image type="content" source="./media/quick-create-visual-studio-code/query.png" alt-text="Screenshot showing the transformation query.":::
142
+
:::image type="content" source="./media/quick-create-visual-studio-code/query.png" lightbox="./media/quick-create-visual-studio-code/query.png" alt-text="Screenshot showing the transformation query.":::
143
143
144
144
## Define a live input
145
145
146
146
1. Right-click the **Inputs** folder in your Stream Analytics project. Then select **ASA: Add Input** from the context menu.
147
147
148
-
:::image type="content" source="./media/quick-create-visual-studio-code/add-input-from-inputs-folder.png" alt-text="Screenshot showing the ASA: Add input menu in Visual Studio Code.":::
148
+
:::image type="content" source="./media/quick-create-visual-studio-code/add-input-from-inputs-folder.png" lightbox="./media/quick-create-visual-studio-code/add-input-from-inputs-folder.png" alt-text="Screenshot showing the ASA: Add input menu in Visual Studio Code.":::
149
149
150
150
Or select **Ctrl+Shift+P** (or **View** -> **Command palette** menu) to open the command palette and enter **ASA: Add Input**.
151
151
152
-
:::image type="content" source="./media/quick-create-visual-studio-code/add-input.png" alt-text="Screenshot showing the ASA: Add input in the command palette of Visual Studio Code.":::
152
+
:::image type="content" source="./media/quick-create-visual-studio-code/add-input.png" lightbox="./media/quick-create-visual-studio-code/add-input.png" alt-text="Screenshot showing the ASA: Add input in the command palette of Visual Studio Code.":::
153
153
2. Choose **IoT Hub** for the input type.
154
154
155
-
:::image type="content" source="./media/quick-create-visual-studio-code/iot-hub.png" alt-text="Screenshot showing the selection of your IoT hub in VS Code command palette.":::
155
+
:::image type="content" source="./media/quick-create-visual-studio-code/iot-hub.png" lightbox="./media/quick-create-visual-studio-code/iot-hub.png" alt-text="Screenshot showing the selection of your IoT hub in VS Code command palette.":::
156
156
3. If you added the input from the command palette, choose the Stream Analytics query script that will use the input. It should be automatically populated with the file path to **myASAproj.asaql**.
157
157
158
-
:::image type="content" source="./media/quick-create-visual-studio-code/asa-script.png" alt-text="Screenshot showing the selection of your Stream Analytics script in VS Code command palette.":::
158
+
:::image type="content" source="./media/quick-create-visual-studio-code/asa-script.png" lightbox="./media/quick-create-visual-studio-code/asa-script.png" alt-text="Screenshot showing the selection of your Stream Analytics script in VS Code command palette.":::
159
159
4. Choose **Select from your Azure Subscriptions** from the drop-down menu, and then press **ENTER**.
160
160
161
-
:::image type="content" source="./media/quick-create-visual-studio-code/add-input-select-subscription.png" alt-text="Screenshot showing the selection of your Azure subscription in VS Code command palette.":::
161
+
:::image type="content" source="./media/quick-create-visual-studio-code/add-input-select-subscription.png" lightbox="./media/quick-create-visual-studio-code/add-input-select-subscription.png" alt-text="Screenshot showing the selection of your Azure subscription in VS Code command palette.":::
162
162
5. Edit the newly generated **IoTHub1.json** file with the following values. Keep default values for fields not mentioned here.
163
163
164
164
|Setting|Suggested value|Description|
@@ -169,11 +169,11 @@ Before you define the Stream Analytics job, you should prepare the data that's l
169
169
170
170
You can use the CodeLens feature to help you enter a string, select from a drop-down list, or change the text directly in the file. The following screenshot shows **Select from your Subscriptions** as an example. The credentials are auto-listed and saved in local credential manager.
171
171
172
-
:::image type="content" source="./media/quick-create-visual-studio-code/configure-input.png" alt-text="Screenshot showing the launch of CodeLens feature in VS Code.":::
172
+
:::image type="content" source="./media/quick-create-visual-studio-code/configure-input.png" lightbox="./media/quick-create-visual-studio-code/configure-input.png" alt-text="Screenshot showing the launch of CodeLens feature in VS Code.":::
173
173
174
174
After you select a subscription, **select an IoT hub** if you have multiple hubs in that subscription.
175
175
176
-
:::image type="content" source="./media/quick-create-visual-studio-code/select-iot-hub.png" alt-text="Screenshot showing the selection of your IoT hub in VS Code.":::
176
+
:::image type="content" source="./media/quick-create-visual-studio-code/select-iot-hub.png" lightbox="./media/quick-create-visual-studio-code/select-iot-hub.png" alt-text="Screenshot showing the selection of your IoT hub in VS Code.":::
177
177
178
178
> [!IMPORTANT]
179
179
> Make sure that the name of the input is **Input** as the query expect it.
@@ -182,7 +182,7 @@ Before you define the Stream Analytics job, you should prepare the data that's l
182
182
183
183
Select **Preview data** in **IoTHub1.json** from the top line. Some input data will be fetched from the IoT hub and shown in the preview window. This process might take a while.
184
184
185
-
:::image type="content" source="./media/quick-create-visual-studio-code/preview-live-input.png" alt-text="Screenshot showing the preview of input data in your IoT hub.":::
185
+
:::image type="content" source="./media/quick-create-visual-studio-code/preview-live-input.png" lightbox="./media/quick-create-visual-studio-code/preview-live-input.png" alt-text="Screenshot showing the preview of input data in your IoT hub.":::
186
186
187
187
## Define an output
188
188
@@ -199,7 +199,7 @@ Select **Preview data** in **IoTHub1.json** from the top line. Some input data w
199
199
|Container|container1|Select the existing container that you created in your storage account.|
200
200
|Path Pattern|output|Enter the name of a file path to be created within the container.|
201
201
202
-
:::image type="content" source="./media/quick-create-visual-studio-code/configure-output.png" alt-text="Screenshot showing the configuration of output for the Stream Analytics job.":::
202
+
:::image type="content" source="./media/quick-create-visual-studio-code/configure-output.png" lightbox="./media/quick-create-visual-studio-code/configure-output.png" alt-text="Screenshot showing the configuration of output for the Stream Analytics job.":::
203
203
204
204
> [!IMPORTANT]
205
205
> Make sure that the name of the output is **Output** as the query expect it.
@@ -210,20 +210,20 @@ Script compilation checks syntax and generates the Azure Resource Manager templa
210
210
211
211
- Select the script from the workspace and then compile from the command palette.
212
212
213
-
:::image type="content" source="./media/quick-create-visual-studio-code/compile-script1.png" alt-text="Screenshot showing the compilation of script option from the command palette.":::
213
+
:::image type="content" source="./media/quick-create-visual-studio-code/compile-script1.png" lightbox="./media/quick-create-visual-studio-code/compile-script1.png" alt-text="Screenshot showing the compilation of script option from the command palette.":::
214
214
- Right-click the script and select **ASA: Compile Script**.
215
215
216
-
:::image type="content" source="./media/quick-create-visual-studio-code/compile-script2.png" alt-text="Screenshot showing the compilation of script option from the Stream Analytics explorer in VS Code.":::
216
+
:::image type="content" source="./media/quick-create-visual-studio-code/compile-script2.png" lightbox="./media/quick-create-visual-studio-code/compile-script2.png" alt-text="Screenshot showing the compilation of script option from the Stream Analytics explorer in VS Code.":::
217
217
218
218
After compilation, you can see results in the **Output** window. You can find the two generated Azure Resource Manager templates in the **Deploy** subfolder in your project folder. These two files are used for automatic deployment.
219
219
220
-
:::image type="content" source="./media/quick-create-visual-studio-code/deployment-templates.png" alt-text="Screenshot showing the generated deployment templates in the project folder.":::
220
+
:::image type="content" source="./media/quick-create-visual-studio-code/deployment-templates.png" lightbox="./media/quick-create-visual-studio-code/deployment-templates.png" alt-text="Screenshot showing the generated deployment templates in the project folder.":::
221
221
222
222
## Submit a Stream Analytics job to Azure
223
223
224
224
1. In the script editor window of your query script, select **Submit to Azure**.
225
225
226
-
:::image type="content" source="./media/quick-create-visual-studio-code/submit-job.png" alt-text="Screenshot showing the submit job button to submit the Stream Analytics job to Azure.":::
226
+
:::image type="content" source="./media/quick-create-visual-studio-code/submit-job.png" lightbox="./media/quick-create-visual-studio-code/submit-job.png" alt-text="Screenshot showing the submit job button to submit the Stream Analytics job to Azure.":::
227
227
2. Select your subscription from the pop-up list.
228
228
3. Choose **Select a job**. Then choose **Create New Job**.
229
229
4. Enter your job name, **myASAjob**. Then follow the instructions to choose the resource group and location.
@@ -235,11 +235,11 @@ After compilation, you can see results in the **Output** window. You can find th
235
235
1. Open **Stream Analytics Explorer** in Visual Studio Code and find your job, **myASAJob**.
236
236
2. Select **Start** from the **Cloud view** page (OR) right-click the job name in Stream Analytics explorer, and select **Start** from the context menu.
237
237
238
-
:::image type="content" source="./media/quick-create-visual-studio-code/start-asa-job-vs-code.png" alt-text="Screenshot showing the Start job button in the Cloud view page.":::
238
+
:::image type="content" source="./media/quick-create-visual-studio-code/start-asa-job-vs-code.png" lightbox="./media/quick-create-visual-studio-code/start-asa-job-vs-code.png" alt-text="Screenshot showing the Start job button in the Cloud view page.":::
239
239
4. Note that the job status has changed to **Running**. Right-click the job name and select **Open Job View in Portal** to see the input and output event metrics. This action might take a few minutes.
240
240
5. To view the results, open the blob storage in the Visual Studio Code extension or in the Azure portal.
241
241
242
-
:::image type="content" source="./media/quick-create-visual-studio-code/output-files.png" alt-text="Screenshot showing the output file in the Blob container.":::
242
+
:::image type="content" source="./media/quick-create-visual-studio-code/output-files.png" lightbox="./media/quick-create-visual-studio-code/output-files.png" alt-text="Screenshot showing the output file in the Blob container.":::
0 commit comments