Hi all, I'm trying to write a Flink SQL query whic...
# troubleshooting
a
Hi all, I'm trying to write a Flink SQL query which will essentially
CROSS JOIN UNNEST
on a JSON array which is coming in as a string. I am not able to change this input format. I was hoping I could do something like
JSON_DATA(json_array_column, '$[*]')
or
JSON_DATA(json_array_column, '$[*].an_int_field)
, but that returns NULL. and doing the same with
JSON_QUERY
gives a single row with a string result, while I would like multiple rows with an int result as I would get with
CROSS JOIN UNNEST
on an array of ints.
CROSS JOIN UNNEST
itself gives an error as it can't be used on a string. I basically want the opposite of
JSON_STRING
to allow me to turn a string into an array. Is there any way to do this?