Skip to content

Commit ad58a78

Browse files
Merge pull request #227471 from spelluru/asabuildissues0215
ASA: fixed build issues: ms.author
2 parents f4e0ab8 + 401e5b9 commit ad58a78

File tree

3 files changed

+42
-40
lines changed

3 files changed

+42
-40
lines changed

articles/stream-analytics/stream-analytics-build-an-iot-solution-using-stream-analytics.md

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
title: Build an IoT solution by using Azure Stream Analytics
33
description: Getting-started tutorial for the Stream Analytics IoT solution of a tollbooth scenario
44
author: ajetasin
5-
ms.author: ajetasin
5+
ms.author: ajetasi
66
ms.service: stream-analytics
77
ms.topic: how-to
8-
ms.date: 12/06/2018
8+
ms.date: 02/15/2023
99
ms.custom: seodec18, ignite-2022
1010
---
1111

@@ -14,7 +14,7 @@ ms.custom: seodec18, ignite-2022
1414
## Introduction
1515
In this solution, you learn how to use Azure Stream Analytics to get real-time insights from your data. Developers can easily combine streams of data, such as click-streams, logs, and device-generated events, with historical records or reference data to derive business insights. As a fully managed, real-time stream computation service that's hosted in Microsoft Azure, Azure Stream Analytics provides built-in resiliency, low latency, and scalability to get you up and running in minutes.
1616

17-
After completing this solution, you are able to:
17+
After completing this solution, you're able to:
1818

1919
* Familiarize yourself with the Azure Stream Analytics portal.
2020
* Configure and deploy a streaming job.
@@ -27,16 +27,17 @@ You need the following prerequisites to complete this solution:
2727
* An [Azure subscription](https://azure.microsoft.com/pricing/free-trial/)
2828

2929
## Scenario introduction: "Hello, Toll!"
30-
A toll station is a common phenomenon. You encounter them on many expressways, bridges, and tunnels across the world. Each toll station has multiple toll booths. At manual booths, you stop to pay the toll to an attendant. At automated booths, a sensor on top of each booth scans an RFID card that's affixed to the windshield of your vehicle as you pass the toll booth. It is easy to visualize the passage of vehicles through these toll stations as an event stream over which interesting operations can be performed.
30+
A toll station is a common phenomenon. You encounter them on many expressways, bridges, and tunnels across the world. Each toll station has multiple toll booths. At manual booths, you stop to pay the toll to an attendant. At automated booths, a sensor on top of each booth scans an RFID card that's affixed to the windshield of your vehicle as you pass the toll booth. It's easy to visualize the passage of vehicles through these toll stations as an event stream over which interesting operations can be performed.
3131

3232
![Picture of cars at toll booths](media/stream-analytics-build-an-iot-solution-using-stream-analytics/cars-in-toll-booth.jpg)
3333

3434
## Incoming data
3535
This solution works with two streams of data. Sensors installed in the entrance and exit of the toll stations produce the first stream. The second stream is a static lookup dataset that has vehicle registration data.
3636

3737
### Entry data stream
38-
The entry data stream contains information about cars as they enter toll stations. The exit data events are live streamed into an Event Hub queue from a Web App included in the sample app.
38+
The entry data stream contains information about cars as they enter toll stations. The exit data events are live streamed into an event hub from a Web App included in the sample app.
3939

40+
```
4041
| TollID | EntryTime | LicensePlate | State | Make | Model | VehicleType | VehicleWeight | Toll | Tag |
4142
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
4243
| 1 |2014-09-10 12:01:00.000 |JNB 7001 |NY |Honda |CRV |1 |0 |7 | |
@@ -45,8 +46,9 @@ The entry data stream contains information about cars as they enter toll station
4546
| 2 |2014-09-10 12:03:00.000 |XYZ 1003 |CT |Toyota |Corolla |1 |0 |4 | |
4647
| 1 |2014-09-10 12:03:00.000 |BNJ 1007 |NY |Honda |CRV |1 |0 |5 |789123456 |
4748
| 2 |2014-09-10 12:05:00.000 |CDE 1007 |NJ |Toyota |4x4 |1 |0 |6 |321987654 |
49+
```
4850

49-
Here is a short description of the columns:
51+
Here's a short description of the columns:
5052

5153
| Column | Description |
5254
| --- | --- |
@@ -62,7 +64,7 @@ Here is a short description of the columns:
6264
| Tag |The e-Tag on the automobile that automates payment; blank where the payment was done manually |
6365

6466
### Exit data stream
65-
The exit data stream contains information about cars leaving the toll station. The exit data events are live streamed into an Event Hub queue from a Web App included in the sample app.
67+
The exit data stream contains information about cars leaving the toll station. The exit data events are live streamed into an event hub from a Web App included in the sample app.
6668

6769
| **TollId** | **ExitTime** | **LicensePlate** |
6870
| --- | --- | --- |
@@ -73,7 +75,7 @@ The exit data stream contains information about cars leaving the toll station. T
7375
| 1 |2014-09-10T12:08:00.0000000Z |BNJ 1007 |
7476
| 2 |2014-09-10T12:07:00.0000000Z |CDE 1007 |
7577

76-
Here is a short description of the columns:
78+
Here's a short description of the columns:
7779

7880
| Column | Description |
7981
| --- | --- |
@@ -93,7 +95,7 @@ The solution uses a static snapshot of a commercial vehicle registration databas
9395
| SNY 7188 |592133890 |0 |
9496
| ELH 9896 |678427724 |1 |
9597

96-
Here is a short description of the columns:
98+
Here's a short description of the columns:
9799

98100
| Column | Description |
99101
| --- | --- |
@@ -102,7 +104,7 @@ Here is a short description of the columns:
102104
| Expired |The registration status of the vehicle: 0 if vehicle registration is active, 1 if registration is expired |
103105

104106
## Set up the environment for Azure Stream Analytics
105-
To complete this solution, you need a Microsoft Azure subscription. If you do not have an Azure account, you can [request a free trial version](https://azure.microsoft.com/pricing/free-trial/).
107+
To complete this solution, you need a Microsoft Azure subscription. If you don't have an Azure account, you can [request a free trial version](https://azure.microsoft.com/pricing/free-trial/).
106108

107109
Be sure to follow the steps in the "Clean up your Azure account" section at the end of this article so that you can make the best use of your Azure credit.
108110

@@ -120,7 +122,7 @@ There are several resources that can easily be deployed in a resource group toge
120122

121123
5. Select an Azure location.
122124

123-
6. Specify an **Interval** as a number of seconds. This value is used in the sample web app, for how frequently to send data into Event Hub.
125+
6. Specify an **Interval** as a number of seconds. This value is used in the sample web app, for how frequently to send data into an event hub.
124126

125127
7. **Check** to agree to the terms and conditions.
126128

@@ -140,11 +142,11 @@ There are several resources that can easily be deployed in a resource group toge
140142
- One Azure Cosmos DB Account
141143
- One Azure Stream Analytics Job
142144
- One Azure Storage Account
143-
- One Azure Event Hub
145+
- One Azure event hub
144146
- Two Web Apps
145147

146148
## Examine the sample TollApp job
147-
1. Starting from the resource group in the previous section, select the Stream Analytics streaming job starting with the name **tollapp** (name contains random characters for uniqueness).
149+
1. Starting from the resource group in the previous section, select the Stream Analytics streaming job starting with the name `tollapp` (name contains random characters for uniqueness).
148150

149151
2. On the **Overview** page of the job, notice the **Query** box to view the query syntax.
150152

@@ -160,8 +162,8 @@ There are several resources that can easily be deployed in a resource group toge
160162
As you can see, Azure Stream Analytics uses a query language that's like SQL and adds a few extensions to specify time-related aspects of the query. For more details, read about [Time Management](/stream-analytics-query/time-management-azure-stream-analytics) and [Windowing](/stream-analytics-query/windowing-azure-stream-analytics) constructs used in the query.
161163

162164
3. Examine the Inputs of the TollApp sample job. Only the EntryStream input is used in the current query.
163-
- **EntryStream** input is an Event Hub connection that queues data representing each time a car enters a tollbooth on the highway. A web app that is part of the sample is creating the events, and that data is queued in this Event Hub. Note that this input is queried in the FROM clause of the streaming query.
164-
- **ExitStream** input is an Event Hub connection that queues data representing each time a car exits a tollbooth on the highway. This streaming input is used in later variations of the query syntax.
165+
- **EntryStream** input is an event hub connection that queues data representing each time a car enters a tollbooth on the highway. A web app that is part of the sample is creating the events, and that data is queued in this event hub. Note that this input is queried in the FROM clause of the streaming query.
166+
- **ExitStream** input is an event hub connection that queues data representing each time a car exits a tollbooth on the highway. This streaming input is used in later variations of the query syntax.
165167
- **Registration** input is an Azure Blob storage connection, pointing to a static registration.json file, used for lookups as needed. This reference data input is used in later variations of the query syntax.
166168

167169
4. Examine the Outputs of the TollApp sample job.
@@ -185,11 +187,11 @@ Follow these steps to start the streaming job:
185187

186188
4. Expand the **tollAppDatabase** > **tollAppCollection** > **Documents**.
187189

188-
5. In the list of ids, several docs are shown once the output is available.
190+
5. In the list of IDs, several docs are shown once the output is available.
189191

190-
6. Select each id to review the JSON document. Notice each tollid, windowend time, and the count of cars from that window.
192+
6. Select each ID to review the JSON document. Notice each `tollid`, `windowend time`, and the `count of cars` from that window.
191193

192-
7. After an additional three minutes, another set of four documents is available, one document per tollid.
194+
7. After an additional three minutes, another set of four documents is available, one document per `tollid`.
193195

194196

195197
## Report total time for each car
@@ -225,7 +227,7 @@ AND DATEDIFF (minute, EntryStream, ExitStream ) BETWEEN 0 AND 15
225227
### Review the total time in the output
226228
Repeat the steps in the preceding section to review the Azure Cosmos DB output data from the streaming job. Review the latest JSON documents.
227229

228-
For example, this document shows an example car with a certain license plate, the entrytime and exit time, and the DATEDIFF calculated durationinminutes field showing the toll booth duration as two minutes:
230+
For example, this document shows an example car with a certain license plate, the `entrytime` and `exit time`, and the DATEDIFF calculated `durationinminutes` field showing the toll booth duration as two minutes:
229231
```JSON
230232
{
231233
"tollid": 4,
@@ -299,7 +301,7 @@ To scale up the streaming job to more streaming units:
299301

300302
4. Slide the **Streaming units** slider from 1 to 6. Streaming units define the amount of compute power that the job can receive. Select **Save**.
301303

302-
5. **Start** the streaming job to demonstrate the additional scale. Azure Stream Analytics distributes work across more compute resources and achieve better throughput, partitioning the work across resources using the column designated in the PARTITION BY clause.
304+
5. **Start** the streaming job to demonstrate the additional scale. Azure Stream Analytics distributes work across more compute resources and achieves better throughput, partitioning the work across resources using the column designated in the PARTITION BY clause.
303305

304306
## Monitor the job
305307
The **MONITOR** area contains statistics about the running job. First-time configuration is needed to use the storage account in the same region (name toll like the rest of this document).
@@ -316,6 +318,6 @@ You can access **Activity Logs** from the job dashboard **Settings** area as wel
316318
3. Select **Delete resource group**. Type the name of the resource group to confirm deletion.
317319

318320
## Conclusion
319-
This solution introduced you to the Azure Stream Analytics service. It demonstrated how to configure inputs and outputs for the Stream Analytics job. Using the Toll Data scenario, the solution explained common types of problems that arise in the space of data in motion and how they can be solved with simple SQL-like queries in Azure Stream Analytics. The solution described SQL extension constructs for working with temporal data. It showed how to join data streams, how to enrich the data stream with static reference data, and how to scale out a query to achieve higher throughput.
321+
This solution introduced you to the Azure Stream Analytics service. It demonstrated how to configure inputs and outputs for the Stream Analytics job. By using the Toll Data scenario, the solution explained common types of problems that arise in the space of data in motion and how they can be solved with simple SQL-like queries in Azure Stream Analytics. The solution described SQL extension constructs for working with temporal data. It showed how to join data streams, how to enrich the data stream with static reference data, and how to scale out a query to achieve higher throughput.
320322

321-
Although this solution provides a good introduction, it is not complete by any means. You can find more query patterns using the SAQL language at [Query examples for common Stream Analytics usage patterns](stream-analytics-stream-analytics-query-patterns.md).
323+
Although this solution provides a good introduction, it isn't complete by any means. You can find more query patterns using the SAQL language at [Query examples for common Stream Analytics usage patterns](stream-analytics-stream-analytics-query-patterns.md).

articles/stream-analytics/stream-analytics-custom-path-patterns-blob-storage-output.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
title: Azure Stream Analytics custom blob output partitioning
33
description: This article describes the custom DateTime path patterns and the custom field or attributes features for blob storage output from Azure Stream Analytics jobs.
44
author: an-emma
5-
ms.author: an-emma
5+
ms.author: raan
66
ms.service: stream-analytics
77
ms.topic: conceptual
8-
ms.date: 05/30/2021
8+
ms.date: 02/15/2023
99
ms.custom: seodec18
1010
---
1111

@@ -19,13 +19,13 @@ Custom field or input attributes improve downstream data-processing and reportin
1919

2020
### Partition key options
2121

22-
The partition key, or column name, used to partition input data may contain any character that is accepted for [blob names](/rest/api/storageservices/Naming-and-Referencing-Containers--Blobs--and-Metadata). It is not possible to use nested fields as a partition key unless used in conjunction with aliases, but you can use certain characters to create a hierarchy of files. For example, you can use the following query to create a column that combines data from two other columns to make a unique partition key.
22+
The partition key, or column name, used to partition input data may contain any character that is accepted for [blob names](/rest/api/storageservices/Naming-and-Referencing-Containers--Blobs--and-Metadata). It isn't possible to use nested fields as a partition key unless used in conjunction with aliases, but you can use certain characters to create a hierarchy of files. For example, you can use the following query to create a column that combines data from two other columns to make a unique partition key.
2323

2424
```sql
2525
SELECT name, id, CONCAT(name, "/", id) AS nameid
2626
```
2727

28-
The partition key must be NVARCHAR(MAX), BIGINT, FLOAT, or BIT (1.2 compatibility level or higher). DateTime, Array, and Records types are not supported, but could be used as partition keys if they are converted to Strings. For more information, see [Azure Stream Analytics Data types](/stream-analytics-query/data-types-azure-stream-analytics).
28+
The partition key must be NVARCHAR(MAX), BIGINT, FLOAT, or BIT (1.2 compatibility level or higher). DateTime, Array, and Records types aren't supported, but could be used as partition keys if they're converted to Strings. For more information, see [Azure Stream Analytics Data types](/stream-analytics-query/data-types-azure-stream-analytics).
2929

3030
### Example
3131

@@ -36,15 +36,15 @@ Suppose a job takes input data from live user sessions connected to an external
3636
Similarly, if the job input was sensor data from millions of sensors where each sensor had a **sensor_id**, the Path Pattern would be **{sensor_id}** to partition each sensor data to different folders.
3737

3838

39-
Using the REST API, the output section of a JSON file used for that request may look like the following:
39+
When you use the REST API, the output section of a JSON file used for that request may look like the following image:
4040

4141
![REST API output](./media/stream-analytics-custom-path-patterns-blob-storage-output/stream-analytics-rest-output.png)
4242

43-
Once the job starts running, the *clients* container may look like the following:
43+
Once the job starts running, the `clients` container may look like the following image:
4444

4545
![Clients container](./media/stream-analytics-custom-path-patterns-blob-storage-output/stream-analytics-clients-container.png)
4646

47-
Each folder may contain multiple blobs where each blob contains one or more records. In the above example, there is a single blob in a folder labeled "06000000" with the following contents:
47+
Each folder may contain multiple blobs where each blob contains one or more records. In the above example, there's a single blob in a folder labeled "06000000" with the following contents:
4848

4949
![Blob contents](./media/stream-analytics-custom-path-patterns-blob-storage-output/stream-analytics-blob-contents.png)
5050

@@ -61,11 +61,11 @@ Notice that each record in the blob has a **client_id** column matching the fold
6161

6262
2. If customers want to use more than one input field, they can create a composite key in query for custom path partition in blob output by using **CONCAT**. For example: **select concat (col1, col2) as compositeColumn into blobOutput from input**. Then they can specify **compositeColumn** as the custom path in blob storage.
6363

64-
3. Partition keys are case insensitive, so partition keys like "John" and "john" are equivalent. Also, expressions cannot be used as partition keys. For example, **{columnA + columnB}** does not work.
64+
3. Partition keys are case insensitive, so partition keys like `John` and `john` are equivalent. Also, expressions can't be used as partition keys. For example, **{columnA + columnB}** doesn't work.
6565

66-
4. When an input stream consists of records with a partition key cardinality under 8000, the records will be appended to existing blobs and only create new blobs when necessary. If the cardinality is over 8000 there is no guarantee existing blobs will be written to and new blobs won't be created for an arbitrary number of records with the same partition key.
66+
4. When an input stream consists of records with a partition key cardinality under 8000, the records are appended to existing blobs, and only create new blobs when necessary. If the cardinality is over 8000, there's no guarantee existing blobs will be written to, and new blobs won't be created for an arbitrary number of records with the same partition key.
6767

68-
5. If the blob output is [configured as immutable](../storage/blobs/immutable-storage-overview.md), Stream Analytics will create a new blob each time data is sent.
68+
5. If the blob output is [configured as immutable](../storage/blobs/immutable-storage-overview.md), Stream Analytics creates a new blob each time data is sent.
6969

7070
## Custom DateTime path patterns
7171

@@ -87,7 +87,7 @@ The following format specifier tokens can be used alone or in combination to ach
8787
|{datetime:m}|Minutes from 0 to 60|6|
8888
|{datetime:ss}|Seconds from 00 to 60|08|
8989

90-
If you do not wish to use custom DateTime patterns, you can add the {date} and/or {time} token to the Path Prefix to generate a dropdown with built-in DateTime formats.
90+
If you don't wish to use custom DateTime patterns, you can add the {date} and/or {time} token to the Path Prefix to generate a dropdown with built-in DateTime formats.
9191

9292
![Stream Analytics old DateTime formats](./media/stream-analytics-custom-path-patterns-blob-storage-output/stream-analytics-old-date-time-formats.png)
9393

0 commit comments

Comments
 (0)