doris & StarRocks 错题本
一,spark streaming load写入失败原因是分隔符设置为"\t",没有加转义字符,改为"\t"即正常。
·
一,spark streaming load写入失败
Reason: column count mismatch, expect=25 real=1. src line: [demo-masking 1 2018-02-17 1 B35C300672_1 B600FA855B 72d2b68c1f79fd73d8910ff388685ab0 9cac8970477ec95540ec64a1b2450ee3 2 0.0070 3 0.0076 1.0000 0 0 0.0000 0.0000 0.00 0.00 0 0 0 2018-02-21 21:38:05 2018-02-21 21:38:05];
Reason: column count mismatch, expect=25 real=1. src line: [demo-masking 1 2018-02-19 1 B35C300672_1 B600FA855B 72d2b68c1f79fd73d8910ff388685ab0 9cac8970477ec95540ec64a1b2450ee3 2 0.0038 2 0.0030 1.0000 0 0 0.0000 0.0000 0.00 0.00 0 0 0 2018-02-21 21:36:17 2018-02-21 21:36:17];
原因是分隔符设置为"\t",没有加转义字符,改为"\\t"即正常。
二,SQL 错误 [1064] [42000]: Key columns should be a ordered prefix of the schema.
建表时UNIQUE KEY必须放在所有字段前面声明且保证有序
三,Reason: column(type)) value is null while columns is not nullable. src line: [[‘finance’, ‘15’, ‘100001’, ‘152’, ‘0’, ‘2021-11-03T11:55:57’, ‘2021-11-03T11:55:57’, ‘0’]];
写入StarRocks时报错,但对应的数据并不为空。
Reason: column(type)) value is null while columns is not nullable. src line: [['finance', '16', '100001', '153', '0', '2021-11-03T11:55:57', '2021-11-03T11:55:57', '0']];
Reason: column(type)) value is null while columns is not nullable. src line: [['finance', '3', '1', '152', '0', '2021-10-20T18:03:12', '2021-10-20T18:03:12', '0']];
原因是type对应的类型在StarRocks建表是是tinyint,导致int类型的值插不进去。
解决办法:将type的类型改为int

GitCode 天启AI是一款由 GitCode 团队打造的智能助手,基于先进的LLM(大语言模型)与多智能体 Agent 技术构建,致力于为用户提供高效、智能、多模态的创作与开发支持。它不仅支持自然语言对话,还具备处理文件、生成 PPT、撰写分析报告、开发 Web 应用等多项能力,真正做到“一句话,让 Al帮你完成复杂任务”。
更多推荐
所有评论(0)