Hi
I have a piece of data that Dremio is recognizing as type ARRAY.(checked in INFOMATION_SCHEMA.COLUMNS)
Lets call the column, fieldName.
sample value: [{“tag”:“General Corporate Purposes”}, {“tag”:“Refinance”}]
how do I convert this a varchar?
I tried using the below but unfortunately none of these approaches work.
CAST(fieldName as varchar)
SQL Error: VALIDATION ERROR: Cast function cannot convert value of type RecordType(VARCHAR(65536) fieldName) ARRAY to type VARCHAR(65536)
CONVERT_TO(fieldName,“json”)
works but it returns varbinary. how do i get this to varchar?
Any suggestions would be appreciated. Thanks!