Flink 版本:1.11.1
我的flink sql:
create table stream_tmp.t1(
log string) with (
'connector' = 'kafka',
'topic' = 't1',
'properties.bootstrap.servers' = 'xxxxx:9092',
'properties.group.id' = 'flink_test_01',
'scan.startup.mode' = 'latest-offset',
'format' = 'csv',
'csv.field-delimiter' = '\n'
);
提交到flink sql执行引擎中(获取sql,执行sql内容),报不认识'\n',内容如下:
Caused by: org.apache.flink.table.api.ValidationException: Option
'csv.field-delimiter' must be a string with single character, but was: \n
at
org.apache.flink.formats.csv.CsvFormatFactory.validateCharacterVal(CsvFormatFactory.java:183)
at
org.apache.flink.formats.csv.CsvFormatFactory.validateFormatOptions(CsvFormatFactory.java:158)
at
org.apache.flink.formats.csv.CsvFormatFactory.createDecodingFormat(CsvFormatFactory.java:70)
at
org.apache.flink.table.factories.FactoryUtil$TableFactoryHelper.lambda$discoverOptionalDecodingFormat$1(FactoryUtil.java:430)
... 42 common frames omitted
不明白为什么把'\n'识别成两个字符了
--
Sent from:
http://apache-flink.147419.n8.nabble.com/