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
If you don't see **Event Hubs** on the **Internet of Things** page, type **Event Hubs** in the search box and select it from the results. Then, select **Event Hubs** on the **Marketplace** page.
29
27
3. On the **Create Namespace** page, follow these steps:
30
28
1. Select an **Azure subscription** where you want to create the event hub.
31
29
1. For **Resource group**, select **Create new** and enter a name for the resource group. The Event Hubs namespace is created in this resource group.
@@ -49,23 +47,16 @@ Use the following steps to create an event hub and send call data to that event
49
47
50
48
Before an application can send data to Azure Event Hubs, the event hub must have a policy that allows access. The access policy produces a connection string that includes authorization information.
51
49
52
-
1. On the **Event Hubs Namespace**, select **Event Hubs** under **Entities** on the left menu, and then select the event hub you created.
53
-
54
-
:::image type="content" source="media/event-generator-app/select-event-hub.png" alt-text="Screenshot showing the selection of an event hub on the Event Hubs page.":::
55
-
1. On the **Event Hubs instance** page, select **Shared access policies** under **Settings** on the left menu, and then select **+ Add** on the command bar.
56
-
2. Specify **MyPolicy** for **Name**, select **Manage**, and then select **Create**.
57
-
58
-
:::image type="content" source="media/event-generator-app/create-event-hub-access-policy.png" alt-text="Screenshot showing Shared access policies page for an event hub.":::
59
-
3. Once the policy is created, select the policy name to open the policy. Find the **Connection string–primary key**. Select the **copy** button next to the connection string.
60
-
61
-
:::image type="content" source="media/event-generator-app/save-connection-string.png" alt-text="Screenshot showing the primary connection string of the Event Hubs namespace you created.":::
62
-
4. Paste the connection string into a text editor. You need this connection string in the next section.
50
+
1. On the **Event Hubs Namespace** page, select **Shared access policies** on the left menu.
51
+
1. Select **RootManageSharedAccessKey** from the list of policies.
52
+
1. Then, select the copy button next to **Connection string - primary key**.
53
+
1. Paste the connection string into a text editor. You need this connection string in the next section.
Notice that the connection string contains multiple key-value pairs separated with semicolons: **Endpoint**, **SharedAccessKeyName**, **SharedAccessKey**, and **EntityPath**.
59
+
Notice that the connection string contains multiple key-value pairs separated with semicolons: **Endpoint**, **SharedAccessKeyName**, and **SharedAccessKey**.
69
60
70
61
## Start the event generator application
71
62
@@ -76,7 +67,7 @@ Before you start the TelcoGenerator app, you should configure it to send data to
76
67
3. Update the `<appSettings>` element in the config file with the following details:
77
68
78
69
* Set the value of the **EventHubName** key to the value of the **EntityPath** at the end of the connection string.
79
-
* Set the value of the **Microsoft.ServiceBus.ConnectionString** key to the connection string **without** the EntityPath value at the end. **Don't forget** to remove the semicolon that precedes the EntityPath value.
70
+
* Set the value of the **Microsoft.ServiceBus.ConnectionString** key to the connection string **without** the EntityPath value (`;EntityPath=myeventhub`) at the end. **Don't forget** to remove the semicolon that precedes the EntityPath value.
80
71
4. Save the file.
81
72
82
73
5. Next open a command window and change to the folder where you unzipped the TelcoGenerator application. Then enter the following command:
@@ -116,7 +107,7 @@ Now that you have a stream of call events, you can create a Stream Analytics job
116
107
1. For **Streaming units**, select **1**. Streaming units represent the computing resources that are required to execute a job. By default, this value is set to 1. To learn about scaling streaming units, see [understanding and adjusting streaming units](../stream-analytics-streaming-unit-consumption.md) article.
117
108
1. Select **Review + create** at the bottom of the page.
118
109
119
-

110
+
:::image type="content" source="media/event-generator-app/create-stream-analytics-job.png" alt-text="Screenshot that shows the Create Azure Stream Analytics job page.":::
120
111
1. On the **Review + create** page, review settings, and then select **Create** to create the Stream Analytics job.
121
112
5. After the job is deployed, select **Go to resource** to navigate to the **Stream Analytics job** page.
122
113
@@ -125,7 +116,7 @@ Now that you have a stream of call events, you can create a Stream Analytics job
125
116
The next step is to define an input source for the job to read data using the event hub you created in the previous section.
126
117
127
118
1. On the **Stream Analytics job** page, in the **Job Topology** section on the left menu, select **Inputs**.
128
-
2. On the **Inputs** page, select **+ Add stream input** and **Event hub**.
119
+
2. On the **Inputs** page, select **+ Add input** and **Event hub**.
129
120
130
121
:::image type="content" source="media/event-generator-app/add-input-event-hub-menu.png" lightbox="media/event-generator-app/add-input-event-hub-menu.png" alt-text="Screenshot showing the Input page for a Stream Analytics job.":::
Copy file name to clipboardExpand all lines: articles/stream-analytics/stream-analytics-real-time-fraud-detection.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,15 +5,15 @@ author: ajetasin
5
5
ms.author: ajetasi
6
6
ms.service: stream-analytics
7
7
ms.topic: tutorial
8
-
ms.date: 02/27/2023
8
+
ms.date: 02/14/2024
9
9
#Customer intent: As an IT admin/developer, I want to run a Stream Analytics job to analyze phone call data and visualize results in a Power BI dashboard.
10
10
---
11
11
12
12
# Tutorial: Analyze fraudulent call data with Stream Analytics and visualize results in Power BI dashboard
13
13
14
-
This tutorial shows you how to analyze phone call data using Azure Stream Analytics. The phone call data, generated by a client application, contains fraudulent calls, which are detected by the Stream Analytics job. You can use the techniques from this tutorial for other types of fraud detection, such as credit card fraud or identity theft.
14
+
This tutorial shows you how to analyze phone call data using Azure Stream Analytics. The phone call data, generated by a client application, contains fraudulent calls, which are detected by the Stream Analytics job. You can use techniques from this tutorial for other types of fraud detection, such as credit card fraud or identity theft.
15
15
16
-
In this tutorial, you learn how to:
16
+
In this tutorial, you perform the following tasks:
17
17
18
18
> [!div class="checklist"]
19
19
> * Generate sample phone call data and send it to Azure Event Hubs.
@@ -88,9 +88,9 @@ If you want to archive every event, you can use a pass-through query to read all
88
88
89
89
The Stream Analytics job runs the query against the sample data from the input and displays the output at the bottom of the window. The results indicate that the Event Hubs and the Streaming Analytics job are configured correctly.
90
90
91
-
:::image type="content" source="media/stream-analytics-real-time-fraud-detection/sample-output-passthrough.png" alt-text="Sample output from test query":::
91
+
:::image type="content" source="media/stream-analytics-real-time-fraud-detection/sample-output-passthrough.png" alt-text="Sample output from test query.":::
92
92
93
-
The exact number of records you see will depend on how many records were captured in the sample.
93
+
The exact number of records you see depends on how many records were captured in the sample.
94
94
95
95
### Reduce the number of fields using a column projection
96
96
@@ -110,7 +110,7 @@ FROM
110
110
111
111
Suppose you want to count the number of incoming calls per region. In streaming data, when you want to perform aggregate functions like counting, you need to segment the stream into temporal units, since the data stream itself is effectively endless. You do this using a Streaming Analytics [window function](stream-analytics-window-functions.md). You can then work with the data inside that window as a unit.
112
112
113
-
For this transformation, you want a sequence of temporal windows that don't overlap—each window will have a discrete set of data that you can group and aggregate. This type of window is referred to as a *Tumbling window*. Within the Tumbling window, you can get a count of the incoming calls grouped by `SwitchNum`, which represents the country/region where the call originated.
113
+
For this transformation, you want a sequence of temporal windows that don't overlap—each window has a discrete set of data that you can group and aggregate. This type of window is referred to as a *Tumbling window*. Within the Tumbling window, you can get a count of the incoming calls grouped by `SwitchNum`, which represents the country/region where the call originated.
114
114
115
115
1. Paste the following query in the query editor:
116
116
@@ -126,7 +126,7 @@ For this transformation, you want a sequence of temporal windows that don't over
126
126
127
127
The projection includes `System.Timestamp`, which returns a timestamp for the end of each window.
128
128
129
-
To specify that you want to use a Tumbling window, you use the [TUMBLINGWINDOW](/stream-analytics-query/tumbling-window-azure-stream-analytics) function in the `GROUP BY` clause. In the function, you specify a time unit (anywhere from a microsecond to a day) and a window size (how many units). In this example, the Tumbling window consists of 5-second intervals, so you'll get a count by country/region for every 5 seconds' worth of calls.
129
+
To specify that you want to use a Tumbling window, you use the [TUMBLINGWINDOW](/stream-analytics-query/tumbling-window-azure-stream-analytics) function in the `GROUP BY` clause. In the function, you specify a time unit (anywhere from a microsecond to a day) and a window size (how many units). In this example, the Tumbling window consists of 5-second intervals, so you get a count by country/region for every 5 seconds' worth of calls.
130
130
131
131
2. Select **Test query**. In the results, notice that the timestamps under **WindowEnd** are in 5-second increments.
132
132
@@ -177,16 +177,16 @@ When you use a join with streaming data, the join must provide some limits on ho
177
177
* Add a value andselect**fraudulent calls**.
178
178
* For **Time window to display**, select the last 10 minutes.
179
179
180
-
7. Your dashboard should look like the example below once both tiles are added. Notice that, if your event hub sender application and Streaming Analytics application are running, your Power BI dashboard periodically updates as new data arrives.
180
+
7. Your dashboard should look like the following example once both tiles are added. Notice that, if your event hub sender application and Streaming Analytics application are running, your Power BI dashboard periodically updates as new data arrives.
181
181
182
-

182
+

183
183
184
184
## Embedding your Power BI Dashboard in a web application
185
185
186
-
For this part of the tutorial, you'll use a sample [ASP.NET](https://asp.net/) web application created by the Power BI team to embed your dashboard. For more information about embedding dashboards, see [embedding with Power BI](/power-bi/developer/embedding) article.
186
+
For this part of the tutorial, you use a sample [ASP.NET](https://asp.net/) web application created by the Power BI team to embed your dashboard. For more information about embedding dashboards, see [embedding with Power BI](/power-bi/developer/embedding) article.
187
187
188
188
To set up the application, go to the [PowerBI-Developer-Samples](https://github.com/Microsoft/PowerBI-Developer-Samples) GitHub repository and follow the instructions under the **User Owns Data** section (use the redirect and homepage URLs under the **integrate-web-app** subsection). Since we're using the Dashboard example, use the **integrate-web-app** sample code located in the [GitHub repository](https://github.com/microsoft/PowerBI-Developer-Samples/tree/master/.NET%20Framework/Embed%20for%20your%20organization/).
189
-
Once you've got the application running in your browser, follow these steps to embed the dashboard you created earlier into the web page:
189
+
Once you have the application running in your browser, follow these steps to embed the dashboard you created earlier into the web page:
190
190
191
191
1. Select **Sign in to Power BI**, which grants the application access to the dashboards in your Power BI account.
0 commit comments