Netherlands: Software

Introductie van Micorosoft SQL Server 2016

Issue link:

Contents of this Issue


Page 207 of 212

195 C H A P T E R 9 | Introducing Azure SQL Data Warehouse Note To learn more about Azure Machine Learning, see "Introduction to machine learning on Microsoft Azure" at what-is-machine-learning/. Working with streaming data in Azure Stream Analytics Azure Stream Analytics is a complex, fully managed infrastructure that you can use to process and consume real-time event data generated from an Azure Event Hub. You can use SQL Data Warehouse as an output sink for the streaming data so that you can apply other tools later for deeper analysis. To use Stream Analytics, you must create and configure an event hub and have access to streaming data. Then use the Azure Management Portal to create a new Stream Analytics job. A job uses an input to define the source of the streaming data, a query to define which columns to capture from the streaming data and whether to aggregate the data, and an output to define the target for the query results. Click the Inputs, Query, and Outputs tiles in the Stream Analytics Job blade to create the respective objects. To store the query results in your SQL Data Warehouse, use a SELECT…INTO…FROM statement similar to the one shown in Example 9-9 in the query definition for the job. In the INTO clause, you reference the output alias that you create in the next step, and you use the input alias in the FROM clause. Note A sample event-stream generator is available for download. You can learn how to create and configure an event hub and use the sample generator at "Get started using Azure Stream Analytics: Real-time fraud detection," us/documentation/articles/stream-analytics-get-started/. Example 9-9: Querying an event stream to store results in a SQL Data Warehouse SELECT System.Timestamp as WindowEnd, CategoryName, COUNT(*) as IncidentCount INTO SQLDWOutput FROM CategoryDataStream TIMESTAMP BY IncidentTime GROUP BY TUMBLINGWINDOW(s, 5), CategoryName; When you create the output to your SQL Data Warehouse, you provide the pertinent connection information and the name of the target table, as shown in Figure 9-10. The output alias must match the alias in the INTO clause in the query.

Articles in this issue

Links on this page

Archives of this issue

view archives of Netherlands: Software - Introductie van Micorosoft SQL Server 2016