使用flink doris connector,如果cdc的表是中文时,构造的stream load的label有中文将报错

Viewed 82

doris版本:2.1.5

2024-10-08 16:30:52,180 INFO org.apache.doris.flink.sink.writer.DorisStreamLoad [] - start a check label awhtestb_db1_测试_0_1 to load.
2024-10-08 16:30:52,186 INFO org.apache.doris.flink.sink.writer.RecordBuffer [] - init RecordBuffer capacity 1048576, count 3
2024-10-08 16:30:52,187 INFO org.apache.doris.flink.sink.writer.DorisStreamLoad [] - abort for labelPrefix awhtestb, concat labelPrefix awhtestb_db1_T_FEE_TYPE_0, start chkId 1.
2024-10-08 16:30:52,187 INFO org.apache.doris.flink.sink.writer.DorisStreamLoad [] - start a check label awhtestb_db1_T_FEE_TYPE_0_1 to load.
2024-10-08 16:30:52,187 INFO org.apache.doris.flink.sink.writer.DorisStreamLoad [] - load Result {
"TxnId": -1,
"Label": "awhtestb_db1_??_0_1",
"Comment": "",
"TwoPhaseCommit": "true",
"Status": "Fail",
"Message": "[ANALYSIS_ERROR]TStatus: errCode = 2, detailMessage = Label format error. regex: ^[-A-Za-z0-9:\p{L}]{1,128}$, label: awhtestb_db1??_0_1",
"NumberTotalRows": 0,
"NumberLoadedRows": 0,
"NumberFilteredRows": 0,
"NumberUnselectedRows": 0,
"LoadBytes": 0,
"LoadTimeMs": 0,
"BeginTxnTimeMs": 0,
"StreamLoadPutTimeMs": 0,
"ReadDataTimeMs": 0,
"WriteDataTimeMs": 0,
"CommitAndPublishTimeMs": 0
}

2 Answers

建议改一下表名,不要用中文作为表名,因为doris会将表名拼接到label里导致正则校验失败,可以在表的comment中添加中文注释。