flink sql 写hdfs问题

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

flink sql 写hdfs问题

酷酷的浑蛋
flink.version=1.12.0
Create table t1(
      a varchar
)with (
    connector=kafka
    format=json
)


Create table t2(
      a varchar
)with (
    connector=filesystem
    format=csv
)


SQL: Insert into t2 select a from t1


发送:  {"a":[{"a1":1,"a2":2}]}
Hdfs的结果为:"[{""a1"":1,""a2"":2}]”
问题:为什么一个双引号变成了2个双引号? 发送到其它目标是正常的,发送到hdfs就会变成这样,这个要怎么解决?
Reply | Threaded
Open this post in threaded view
|

Re: flink sql 写hdfs问题

JasonLee
hi

你需要添加下面两个参数:
'csv.line-delimiter'='',
'csv.disable-quote-character'='true'



-----
Best Wishes
JasonLee
--
Sent from: http://apache-flink.147419.n8.nabble.com/
Best Wishes
JasonLee