Finding out the data type of a value in Presto
Asked Answered
S

1

15

I'm getting values from nested maps and it's hard to figure out what data type each value is. Is there a typeof function that can tell me the data type of each value?

Stoughton answered 26/5, 2017 at 1:13 Comment(1)
prestodb.io/docs/current/functions/conversion.html maybe this could help.Diann
M
20

Yes, there is the typeof function:

presto> select typeof(1), typeof('a');
  _col0  |   _col1
---------+------------
 integer | varchar(1)
(1 row)
Marte answered 3/1, 2018 at 8:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.