Prijesh Meppayil
Prijesh Meppayil

Reputation: 540

Azure Stream Analytics tools for Visual Studio: Error when executing aggregated queries - "Object reference not set to an instance of an object"

We have followed the documentation Use Azure Stream Analytics tools for Visual Studio and made the Visual Studio capable of creating Azure Stream Analytics project.

We have created an Azure Stream Analytics(ASA) job with Local Input data in the following JSON format:

[
    {
        "Driver": "Lewis",
        "Speed": 0.8275496959686279,
        "Accelerator": 1,
        "Brakes": 0,
        "Steering": 0,
        "ErsBattery": 0.9398990273475647,
        "Gear": 0,
        "LapTimeMs": 107,
        "EventTime": "2016-04-01T00:00:00.107",
        "PosX": 1593.4061279296875,
        "PosY": 934.5406494140625,
        "PosZ": 101.44535064697266
    },
    {
        "Driver": "James",
        "Speed": 1.8795902729034424,
        "Accelerator": 1,
        "Brakes": 0,
        "Steering": 0,
        "ErsBattery": 0.9865896105766296,
        "Gear": 0,
        "LapTimeMs": 107,
        "EventTime": "2016-04-01T00:00:00.107",
        "PosX": 1593.3990478515625,
        "PosY": 934.5374145507812,
        "PosZ": 101.44610595703125
    },
    {
        "Driver": "Damon",
        "Speed": 0.4023849666118622,
        "Accelerator": 1,
        "Brakes": 0,
        "Steering": 0,
        "ErsBattery": 1,
        "Gear": 0,
        "LapTimeMs": 108,
        "EventTime": "2016-04-01T00:00:00.108",
        "PosX": 1593.411865234375,
        "PosY": 934.5435180664062,
        "PosZ": 101.44485473632812
    }
]

Then we are running the query locally as below:

SELECT Driver, AVG(Speed) AS AvgSpeed
FROM Input 
GROUP BY Driver, TumblingWindow(second, 10)

After executing the query, we are getting an error message as "Error : Object reference not set to an instance of an object."

enter image description here

Upvotes: 1

Views: 170

Answers (1)

Prijesh Meppayil
Prijesh Meppayil

Reputation: 540

Open your Visual Studio IDE in Administrator mode, run your ASA query with local input and you will get the expected query result.

enter image description here

Upvotes: 3

Related Questions