You are working on IOT data where each device has 5 reading in an array collected in Celsius, you were asked to covert each individual reading from Celsius to Fahrenheit, fill in the blank with an appropriate function that can be used in this scenario.

You are working on IOT data where each device has 5 reading in an array collected in Celsius, you were asked to covert each individual reading from Celsius to Fahrenheit, fill in the blank with an appropriate function that can be used in this scenario.

Schema: deviceId INT, deviceTemp ARRAY<double>

SELECT deviceId, __(deviceTempC,i-> (i * 9/5) + 32) as deviceTempF

FROM sensors
A . APPLY
B. MULTIPLY
C. ARRAYEXPR
D. TRANSFORM
E. FORALL

Answer: D

Explanation:

TRANSFORM -> Transforms elements in an array in expr using the function func.1.transform(expr, func)

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments