I am trying to use Azure Stream Analytics Job
for writing data to SQL Server
. I use unique identifier for Id
column, however it seems that I can not generate a guid from Azure Stream Analytics Job
. How can I generate it? Should I change my id column type? Any suggestions?
You can try to use GetMetadataPropertyValue
function.
The EventId property creates a unique ID (Guid) for an input event, which can be useful for primary key purposes. EventId is consistent (not random); if you go back in time and re-read the same input event, Stream Analytics will produce the same ID.
Here is the MSDN. You can also refer to Azure Stream Analytics Unique EventId Property is NULL.