Search code examples
visual-studioazure-stream-analytics

Developing stream analytics job using visual studio tools - how to simulate metadata user properties?


I am testing my stream analytics job locally, using json files for inputs. My query uses metadata user properties using GetMetadataPropertyValue(T, '[User]'). How can I simulate these metadata properties in my input json file?

For instance I have the following input_messages.json

{
  "pressure": 34,
  "temperature":71
}

The device that is sending this message also adds some properties by doing

message.Properties.Add("Version", "1.0");

Now I am trying to simulate the same message along with its metadata properties in my json file. How do I do that?


Solution

  • we do not support this scenario for local input file, but you can try our live data testing and connect to your input eventhub or iothub directly and GetMetadataPropertyValue should work well.