-
我的目标表是一个array类型,来源表中是一个json array格式的字符串,我使用自定义函数将其转为array类型,但在transform中使用cast (xxx as ARRAY)时,报语法解析错误 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
11:35:16.084 [main] ERROR org.apache.flink.cdc.runtime.parser.TransformParser - Statements can not be parsed. SELECT CAST (id AS VARCHAR) as _id, CAST (parse_json_str_to_array(vector_field) AS ARRAY) as vector_field, image_url, image_long as image_timestamp, image_price, image_date as image_date, generate_string_array(15, 1000) as image_string_array, image_float, image_string_to_int as image_int, image_keyword FROM TB |
Beta Was this translation helpful? Give feedback.
-
目前有没有什么办法,能把string格式的数据,转成array格式 |
Beta Was this translation helpful? Give feedback.
I believe CastToArray function isn't provided yet. A possible alternative solution would be writing a UDF and invoking it in transform rules.