In my project i recieve data from Azure IoThub and want to send it to a SQL database using Azure stream analytics. Im trying to achieve this using the following query:
SELECT
IoTDataArrayElement.ArrayValue.sProjectID AS id
INTO
[test-machine]
FROM
[iothub-input] AS e
CROSS APPLY GetArrayElements(e.iotdata) AS IoTDataArrayElement
HAVING IoTDataArrayElement.ArrayValue IS NOT NULL
When i run the query in the enviorment provided by stream analytics and press test query i get the expected output wich is a projectID. But when i start the stream analytics job the data doesnt go in to my database table. The table has 1 column 'id'.
When i try to send all the data to a blob storage the stream analytics job works.
Can someone please explain to me why the query i use for sending the data to a database doesnt actually send the data to a database?