Abhinav Sharma
Abhinav Sharma

Reputation: 319

How to send data as CSV on Eventhub for Azure Stream Analytics?

I am using Azure stream analytics and my input is Eventhub,EVENT SERIALIZATION FORMAT is CSV and DELIMITER is comma(,).My query is select DeviceId,Temperature from input and my output is sql database. but when my job is running it gives me error like

"After deserialization, 0 rows have been found. If this is not expected, possible reasons could be a missing header or malformed CSV input"

and second error is

Could not deserialize the input event as Csv. Some possible reasons:

1) Malformed events

2) Input source configured with incorrect serialization format..

and i am sending data on Eventhub like This

string messageBody1 = "DeviceID:20," + "Temperature:30";
ClientHelper.SendMessage(messageBody1).Wait();

Upvotes: 2

Views: 3868

Answers (1)

ppatierno
ppatierno

Reputation: 10075

Your current CSV format is wrong because you need to specify column names on the first line and related values in the following lines as :

DeviceID,Temperature
20,30

Paolo

Upvotes: 5

Related Questions