GetRecordPropertyValue (Azure Stream Analytics)
Updated: April 22, 2016
Applies To: Azure
Returns the record value associated with the specified property.
Syntax
GetRecordPropertyValue ( record_expression, string_expression )
record_expression
Is the record expression to be evaluated as a source record. record_expression can be a column of type Record or result of another function call.
string_expression
Is the string expression to be evaluated as a record property name.
Return type is determined by the record property type and can be any of the supported types.
In this code example, “thresholds” is a reference data name defined on the inputs tab.
SELECT
input.DeviceID,
thresholds.SensorName
FROM input
JOIN thresholds
ON
input.DeviceId = thresholds.DeviceId
WHERE
GetRecordPropertyValue(input.SensorReading, thresholds.SensorName) > thresholds.Value
Note that you can use dot notation to access record property fields.
SELECT
recordColumn.NestedFieldName1.NestedFieldName2
FROM input
Show: