Azure Stream Analytics

Slides:



Advertisements
Similar presentations
MICROSOFT OFFICE ACCESS 2007.
Advertisements

Some Introductory Programming 1. Structured Query Language (SQL) - used for queries. - a standard database product. 2. Visual Basic for Applications -
Observation Pattern Theory Hypothesis What will happen? How can we make it happen? Predictive Analytics Prescriptive Analytics What happened? Why.
Running Hadoop-as-a-Service in the Cloud
Tutorial 1 Creating a Database. Objectives Learn basic database concepts and terms Learn basic database concepts and terms Explore the Microsoft Access.
Chapter 4: Organizing and Manipulating the Data in Databases
Microsoft Access Data Base Application. A Few Terms Database – A collection of related information. Database – A collection of related information. Field.
Grade Book Database Presentation Jeanne Winstead CINS 137.
Windows Azure. Azure Application platform for the public cloud. Windows Azure is an operating system You can: – build a web application that runs.
DAY 21: MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Aliya Farheen October 29,2015.
+ Logentries Is a Real-Time Log Analytics Service for Aggregating, Analyzing, and Alerting on Log Data from Microsoft Azure Apps and Systems MICROSOFT.
Janet works on the Azure Stream Analytics team, focusing on the service and portal UX. She has been in the data space at Microsoft for 5 years, previously.
Dr Greg Low Azure Datacamp Power Hour CLD21 3.
Let’s do some IoT stuff… with an Arduino board and Azure Stream Analytics Internet of Things.
Microsoft Ignite /28/2017 6:07 PM
SQL IMPLEMENTATION & ADMINISTRATION Indexing & Views.
This document and the information contained herein is confidential and proprietary to Allegient LLC and shall not be duplicated, used or disclosed in whole.
This document and the information contained herein is confidential and proprietary to Allegient LLC and shall not be duplicated, used or disclosed in whole.
Microsoft Access 2013 ®® Case Study Creating a Database.
Energy Management Solution
Power BI – What You Need to Know
CRM for Microsoft Dynamics 365
Connected Infrastructure
Tutorial 1 Creating a Database
WPC042 - Data ON THE ROAD: the IoT architecture
IoT 101 with Raspberry Pi and Azure
5/9/2018 7:28 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS.
Connected Living Connected Living What to look for Architecture
Welcome! Power BI User Group (PUG)
GO! with Microsoft Office 2016
Access Tutorial 1 Creating a Database
BASIC INFORMATION ABOUT DATABASE MANAGEMENT SOFTWARE
Developing apps for the Internet of Things
Optimizing Edge-Cloud IoT Applications for Performance and Cost
7/4/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
Connected Living Connected Living What to look for Architecture
SMS MARKETING.
GO! with Microsoft Access 2016
Introduction With TimeCard appointments are tagged with information that converts them into time sheets. This way you can report time.
Azure Streaming Analytics
Connected Infrastructure
Power BI – Exploring New Frontiers
Stream Analytics Coolest and Exciting
Remote Monitoring solution
Energy Management Solution
Introduction With TimeCard users can tag SharePoint events with information that converts them into time sheets. This way they can report.
9/18/ :06 AM BRK2212 Gain visibility into Network performance and availability with Network monitoring solutions in Azure Vijay Tinnanur Abhishek.
M.R. Ashwin Prabhu Unified tracking across on premise and the cloud
Shubha Vijayasarathy Program Manager, Azure Event Hubs - Microsoft
Introducing EasyVoIZ 5 Version 5.
Transition from Classic Interface Phoenix Interface to
Introduction to Azure Streaming Analytics
WEBINAR “Automation of document generation and document processing with AutoMerge” Atlanta, 10/21/2013 Clint Higley I would like to welcome everyone to.
Power Apps & Flow for Microsoft Dynamics SL
Power BI – Exploring New Frontiers
Azure’s Scalability, Array of Services in Cloud
Access Tutorial 1 Creating a Database
Case Study Creating a Database
XtremeData on the Microsoft Azure Cloud Platform:
Introduction to Database Programs
Technical Capabilities
Applying Data Warehouse Techniques
Introduction to Database Programs
Topic 11 Lesson 1 - Analyzing Data in Access
Power BI – Exploring New Frontiers
Databases and Information Management
Azure Stream Analytics
Introduction to Azure Streaming Analytics
Getting Started with Data
Introduction to Azure Streaming Analytics
Presentation transcript:

Azure Stream Analytics [ Instructor Name ] [ Instructor E-mail ]

The Internet of Things (IoT) Currently 20 billion devices connected to the Internet By 2020, expect 50 billion or more Health-monitoring devices Thermostats, wind turbines, and solar farms Cars, trucks, traffic lights, and drones EVERYTHING will be connected How do you process all that data? How do you process it in real time? Extracting information from a database using queries (for example, SQL queries) is a well-understood science and is familiar to most researchers. Extracting information from high-volume, high-velocity data streams is an altogether different proposition. Imagine thousands of wind turbines firing telemetry data that includes gear-box oil temperatures (along with other information) at a centralized event hub. How would you write a query that, in real time, identifies all wind turbines whose average oil temperature over the last three minutes exceeds a certain threshold? The demand to process fast-moving data streams in this way is growing every day thanks to the proliferation of mobile phones and IoT devices.

Azure Stream Analytics Highly scalable service for analyzing data in motion Supports SQL-like query language for data analysis Scales using Streaming Units (1 SU ~= 1 MB/sec) Event Hubs Event Hubs A good way to characterize Stream Analytics is to say that a database lets you determine how many red cars were sold last year. Stream Analytics lets you determine how many red cars are in the parking lot at any given time. A great example of why it's useful to perform temporal queries on streaming data can be found at http://bit.ly/1SE5g9X ("Connected Cows"). Blob Storage IoT Hubs Azure SQL Database Blob Storage Other Output Sinks Stream Analytics

Stream Analytics at Work Here's a typical scenario showing how Stream Analytics is used. On the left are the event producers, such as mobile phones an IoT sensors. They fire events to an Azure event hub (using a cloud gateway as an intermediary if the devices themselves aren't IP-capable), which aggregates the events and delivers them to a Stream Analytics job. Stream Analytics queries the data stream and sends the results to one or more outputs, which might include blob storage, a SQL Azure database, another event hub, or (not shown here) Microsoft Power BI.

Stream Analytics Query Language SQL-like language for querying live data streams Subset of T-SQL Supports bigint, float, nvarchar(max), datetime, record, and array Supports SELECT, FROM, WHERE, GROUP BY, and other common Data Manipulation Language (DML) statements Supports COUNT, AVG, DATEDIFF, and other common functions Adds extensions such as TIMESTAMP BY and System.Timestamp Supports temporal grouping of events via "windowing" The genius of Azure Stream Analytics is that it allows you to "use what you know" by using SQL to query dynamic data streams. It's not straight SQL, but an enhanced version of T-SQL. The enhancements are necessary to deal with dynamic data. For example, the windowing enhancements enable you to ask questions such as "how many red cars enter the parking lot every 5 minutes?" TIMESTAMP BY lets you designate a field in the data stream as the one that holds the event time -- the time at which the event actually occurred (as opposed to the time the event reached an event hub, which is the default).

Querying a Data Stream List all Connecticut cars that enter a toll booth, and include the entry time, toll booth ID, and license-plate number SELECT EntryTime, TollId, LicensePlate FROM EntryData WHERE State = 'CT' This is a simple query that would work against a SQL database. It also works in Azure Stream Analytics. The context is a scenario in which you manage a collection of toll booths, and an event is fired each time a car enters or leaves a tool booth (two separate data streams in this scenario). Each event includes information such as the event time, the make and model of the car, and the car's license plate info (state and license-plate number).

Designating a Field as the Event Time Designate the EntryTime field as the event time for calculations that involve event time SELECT System.Timestamp AS [Entry Time], TollId, LicensePlate FROM EntryData TIMESTAMP BY EntryTime WHERE State = 'CT' TIMESTAMP BY is an important extension to the Stream Analytics Query Language because it lets you designate one field in the data stream as the one that specifies the event time -- the time at which the event actually occurred. Without this, queries that involve event times use the time at which the event arrived at the event hub, not the time at which the event occurred. Virtually all IoT data streams include an event-time field.

JOINing Two Data Streams How long does it take each car that enters a tool booth to pay the toll and exit the booth? SELECT EN.TollId, EN.EntryTime, EN.LicensePlate, DATEDIFF(minute, EN.EntryTime, EX.ExitTime) AS Minutes FROM EntryData EN TIMESTAMP BY EntryTime JOIN ExitData EX TIMESTAMP BY ExitTime ON EN.TollId = EX.TollId AND EN.LicensePlate = EX.LicensePlate AND DATEDIFF(minute, EN, EX) BETWEEN 0 AND 60 This query determines how long it took to service each car that entered a toll booth (i.e., the difference between the time the car entered and exited the toll both). It demonstrates the use of the all-important TIMESTAMP BY extension, which allows you to designate a field in the input as the event time. Without TIMESTAMP BY, the event time is the time at which the event arrived at the input source. And it demonstrates that just as you can use JOIN to join two tables in a SQL database, you can use JOIN in Stream Analytics to join two inputs (data streams). In this example, the two data streams are EntryData and ExitData.

Windowing Count or aggregate events over a specified time period TumblingWindow HoppingWindow SlidingWindow One of the key features of the Stream Analytics Query Language is its ability to group results using windows of time whose length you specify. Syntactically, you exercise windowing by using SQL's GROUP BY clause with TumblingWindow, HoppingWindow, or SlidingWindow. TumblingWindow allows you to ask questions such as "How many red cars go through my toll booths every 5 minutes?" HoppingWindow lets you ask the same question but generate output at intervals that are independent of the window size -- for example, "Tell me once a minute how many red cars go through my toll booths every 5 minutes." SlidingWindow lets you ask "During which 5-minute time periods do 10 or more red cars go through my toll booths?"

Using TumblingWindow How many New York cars enter a toll booth every 5 minutes? SELECT DateAdd(minute, -5, System.TimeStamp) AS [Start Time], System.TimeStamp AS [End Time], COUNT(*) FROM EntryData TIMESTAMP BY EntryTime WHERE State = 'NY' GROUP BY TumblingWindow(minute, 5) This query answers the question "How many cars with NY license plates enter my tool booths every 5 minutes?" and generates an output every 5 minutes.

Using HoppingWindow What is the average wait time at all toll booths for the last 5 minutes, updated every 1 minute? SELECT DateAdd(minute, -5, System.TimeStamp) AS [Start Time], System.TimeStamp AS [End Time], AVG(DATEDIFF(minute, EN.EntryTime, EX.ExitTime)) AS [Average Wait Time] FROM EntryData EN TIMESTAMP BY EntryTime JOIN ExitData EX TIMESTAMP BY ExitTime ON EN.TollId = EX.TollId AND EN.LicensePlate = EX.LicensePlate AND DATEDIFF(minute, EN, EX) BETWEEN 0 AND 60 GROUP BY HoppingWindow(minute, 5, 1) This query answers the question "What is the average wait time at all toll booths for the last 5 minutes?" and generates an output every 1 minute.

Using SlidingWindow In which 5-minute windows does at least one Connecticut car enter a toll booth? SELECT DateAdd(minute, -5, System.TimeStamp) AS [Start Time], System.TimeStamp AS [End Time], TollId, COUNT(*) FROM EntryData TIMESTAMP BY EntryTime WHERE State = 'CT' GROUP BY TollId, SlidingWindow(minute, 5) HAVING COUNT(*) > 0 This query answers the question "Which toll booths have served at least one car with CT plates in any 5-minute period?"

Building Real-Time Dashboards Direct Stream Analytics output to an Azure event hub Write code that subscribes to events from the event hub You can connect Microsoft Power BI to a Stream Analytics output and generate graphical dashboards without writing any code. Or, if you're a developer, you can use an event hub as output from a Stream Analytics job and build highly customized dashboards by writing code that subscribes to events fired from the event hub. That is exactly what you'll do in the next lab. The screen shot in this slide shows a preview of what you're going to build.

Hands-On Lab Azure Stream Analytics HOL.html