Stream Analytics Job failed

Damir Dobric Posts

Next talks:

 

    

Follow me on Twitter: #ddobric



 

 

Archives

When working with EventStreams  it is sometimes very difficult figure out potential problems. For example, imagine there is a following
script for stream analyzing:

image

Let’s now push following event stream to the script above:

{"temperature":"1","DeviceName":"Frankfurt"}
{"temperature":"1","DeviceName":"Frankfurt"}
{"temperature":"1","DeviceName":"Frankfurt"}
{"temperature":"1","DeviceName":"Frankfurt"}
{"temperature":"1","DeviceName":"Frankfurt"}
{"temperature":"1","DeviceName":"Frankfurt"}
{"temperature":"1","DeviceName":"Frankfurt"}
{"temperature":"1","DeviceName":"Frankfurt"}

On the first look all seems to be perfect. If so, please start your analytic job and sent these events. It is up to you how to send events. This is not the part of this post.

After a while, you will wander, but the job will fail.

image

To figure out the problem you will usually go to dashboard.

image

In most cases you will find useful information here if it is something wrong with INPUTS or OUTPUTS of your ASA job. But, there are (many) cases, when information in dashboard is not helpful at all.
Here is an example:

JobContentVersion:
1.7

JobFailedMessage:
The streaming job failed.

JobFrameworkVersion:
1.2.60108.1

JobId:
313b3e20-281c-4869-8a48-ab5958647a11

JobRunCreatedDateTime:
2016-01-20 22:58:37Z

JobRunId:
e0ecdb80-e41b-4519-b7f4-11036ff6a784

JobRunLastUpdateDateTime:
2016-01-20 23:00:42Z

JobRunStatus:
Failed

Microsoft.Resources/EventNameV2::
Start job '****'

Microsoft.Resources/Operation:
Start job ‘****’

Microsoft.Resources/ResourceUri:
/subscriptions/****/resourceGroups/StreamAnalytics-Default-West-Europe/providers/Microsoft.StreamAnalytics/streamingjobs/****

Everything clear? Not really Sad smile

But there is a very easy way to solve this.
In the query tab You can find a button test. Create a file like mytestevents.json and paste events shown above.

image

Click TEST button, load file which you have previously saved and take a look on result:

image

My problem is obviously the type of column (property) ‘temperature’.

{"temperature":"1","DeviceName":"Frankfurt"}

I need to change it as follows:

{"temperature":1,"DeviceName":"Frankfurt"}

Let’s repeat test again:

image

And, finally let’s inject few bad-events:

image

As you see, we have aggregated 3 bad-events in a capturing window and got out a single alerting event.
Conclusion:

Use TEST if dashboard does not show enough information.


Posted Jan 21 2016, 04:05 PM by Damir Dobric
developers.de is a .Net Community Blog powered by daenet GmbH.