Azure Service Bus Topic to Blob read by Stream Analytics
Today, I learned that - although supposedly more efficient - you cannot actually just copy the input stream from a Azure Service Bus BrokeredMessage into a block blob and have that blob be read by Stream Analytics. This is because stream-copy introduces some control characters into the event stream, which makes it so that stream analytics cannot read the events, thinking that maybe you configured your Path Prefix Pattern wrong. In the example above, notice how I pass CultureInfo.InvariantCulture into the path-generating DateTime expression. This is because DateTime has some magic built in, rending the expression as 2015-09-23-15 for the 23rd of September, 2015 at 15 o'clock on my machine, instead of what I (thought I) requested - 2015/09/23/15 . That aside, the resulting blob had control characters and serialization data in it, which was not something I expected: Extracting the JSON-encoded string itself and uploading that as a byte array, worked a lot better, eli