版本:2.0中的包围符和转义字符具体应该如何使用

Viewed 18

版本:2.0中的包围符和转义字符具体应该如何使用
14. enclose
When the csv data field contains row delimiters or column delimiters, to prevent accidental truncation, single-byte characters can be specified as brackets for protection. For example, the column separator is ",", the bracket is "'", and the data is "a,'b,c'", then "b,c" will be parsed as a field.

  1. escape
    转义符。用于转义在csv字段中出现的与包围符相同的字符。例如数据为"a,'b,'c'",包围符为"'",希望"b,'c被作为一个字段解析,则需要指定单字节转义符,例如"",然后将数据修改为"a,'b,'c'"。image.png

结果::
PROPERTIES
(
"desired_concurrent_number" = "3",
"strict_mode" = "false",
"ENCLOSE"='"'
)
FROM KAFKA
(
"kafka_broker_list" = "mdw:9092,xxxxxxxxxxxx",
"kafka_topic" = "vos2doris-test",
"property.group.id" = "xxxxxxxxxxxxxxxxx-test",
"property.csv.disable-quote-character" = "TRUE",
"property.kafka_default_offsets" = "OFFSET_END",
"property.enable.auto.commit" = "false"
)

1105 - errCode = 2, detailMessage = ENCLOSE is invalid property
时间: 0.007s

1 Answers

routine load包围符自2.0.15、2.1.6、3.0.1及更高版本支持。