导入失败,报错:“too many filtered rows xxx, “ErrorURL“:“

2024-01-17 11:20

本文主要是介绍导入失败,报错:“too many filtered rows xxx, “ErrorURL“:“,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

一、问题:

注:前面能正常写入,突然就报错,导入失败,报错:“too many filtered rows xxx, "ErrorURL":"

{"TxnId":769494,"Label":"datax_doris_writer_bf176078-15d7-414f-8923-b0eb5f6d5da1","TwoPhaseCommit":"false","Status":"Fail","Message":"[INTERNAL_ERROR]too many filtered rows","NumberTotalRows":325476,"NumberLoadedRows":325473,"NumberFilteredRows":3,"NumberUnselectedRows":0,"LoadBytes":94697450,"LoadTimeMs":1498,"BeginTxnTimeMs":0,"StreamLoadPutTimeMs":2,"ReadDataTimeMs":117,"WriteDataTimeMs":1495,"CommitAndPublishTimeMs":0,"ErrorURL":"http://IP:8040/api/_load_error_log?file=__shard_8/error_log_insert_stmt_ce466641e5bad2af-99171040d6f76fb8_ce466641e5bad2af_99171040d6f76fb8"}
http://IP:8040/api/_load_error_log?file=__shard_8/error_log_insert_stmt_ce466641e5bad2af-99171040d6f76fb8_ce466641e5bad2af_99171040d6f76fb8"

内容如下:
Reason: actual column number in csv file is  less than  schema column number.actual number: 11, column separator: [	], line delimiter: [
], schema column number: 16; . src line [320746671400	6540dbac03e56b6315de10f8	279ca466-2047-42f5-9932-1730703644e4	10	沙河市中瑞玻璃制品有限公司玻璃深加工生产线扩建项...	2023-10-31 00:00:00	130582	10	1004	10	]; 
Reason: actual column number in csv file is  less than  schema column number.actual number: 1, column separator: [	], line delimiter: [
], schema column number: 16; . src line [2023-10-31]; 
Reason: actual column number in csv file is  less than  schema column number.actual number: 6, column separator: [	], line delimiter: [
], schema column number: 16; . src line [	\N	0	1698749356710	2023-10-31 18:49:16	2023-11-13 11:05:48]; 

二、解决办法

Datax 代码库编译​

从datax 代码库拉取代码,执行编译

git clone https://github.com/alibaba/DataX.git
cd datax
mvn package assembly:assembly -Dmaven.test.skip=true

注:MYSQL版本改成你使用的版本;

 more  pom.xml 

编译完成后可以在 datax/target/Datax 下看到datax.tar.gz 包

my_import.json

{"job": {"content": [{"reader": {"name": "mysqlreader","parameter": {"column": ["id","order_code","line_code","remark","unit_no","unit_name","price"],"connection": [{"jdbcUrl": ["jdbc:mysql://localhost:3306/demo"],"table": ["employees_1"]}],"username": "root","password": "xxxxx","where": ""}},"writer": {"name": "doriswriter","parameter": {"loadUrl": ["127.0.0.1:8030"],"loadProps": {},"column": ["id","order_code","line_code","remark","unit_no","unit_name","price"],"username": "root","password": "xxxxxx","postSql": ["select count(1) from all_employees_info"],"preSql": [],"flushInterval":30000,"connection": [{"jdbcUrl": "jdbc:mysql://127.0.0.1:9030/demo","selectedDatabase": "demo","table": ["all_employees_info"]}],"loadProps": {"format": "json","strip_outer_array":"true","line_delimiter": "\\x02"}}}}],"setting": {"speed": {"channel": "1"}}}
}

备注:

"loadProps": {"format": "json","strip_outer_array":"true","line_delimiter": "\\x02"
}

  1. 这里我们使用了 JSON 格式导入数据
  2. line_delimiter 默认是换行符,可能会和数据中的值冲突,我们可以使用一些特殊字符或者不可见字符,避免导入错误
  3. strip_outer_array :在一批导入数据中表示多行数据,Doris 在解析时会将数组展开,然后依次解析其中的每一个 Object 作为一行数据
  4. 更多 Stream load 参数请参照 [Stream load文档](Stream load - Apache Doris)
  5. 如果是 CSV 格式我们可以这样使用
"loadProps": {"format": "csv","column_separator": "\\x01","line_delimiter": "\\x02"
}

CSV 格式要特别注意行列分隔符,避免和数据中的特殊字符冲突,这里建议使用隐藏字符,默认列分隔符是:\t,行分隔符:\n

4.执行datax任务,具体参考 datax官网,或者

DataX Doriswriter - Apache Doris

这篇关于导入失败,报错:“too many filtered rows xxx, “ErrorURL“:“的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/615858

相关文章

Spring Boot中JSON数值溢出问题从报错到优雅解决办法

《SpringBoot中JSON数值溢出问题从报错到优雅解决办法》:本文主要介绍SpringBoot中JSON数值溢出问题从报错到优雅的解决办法,通过修改字段类型为Long、添加全局异常处理和... 目录一、问题背景:为什么我的接口突然报错了?二、为什么会发生这个错误?1. Java 数据类型的“容量”限制

SpringBoot项目中报错The field screenShot exceeds its maximum permitted size of 1048576 bytes.的问题及解决

《SpringBoot项目中报错ThefieldscreenShotexceedsitsmaximumpermittedsizeof1048576bytes.的问题及解决》这篇文章... 目录项目场景问题描述原因分析解决方案总结项目场景javascript提示:项目相关背景:项目场景:基于Spring

Pyserial设置缓冲区大小失败的问题解决

《Pyserial设置缓冲区大小失败的问题解决》本文主要介绍了Pyserial设置缓冲区大小失败的问题解决,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面... 目录问题描述原因分析解决方案问题描述使用set_buffer_size()设置缓冲区大小后,buf

解决SpringBoot启动报错:Failed to load property source from location 'classpath:/application.yml'

《解决SpringBoot启动报错:Failedtoloadpropertysourcefromlocationclasspath:/application.yml问题》这篇文章主要介绍... 目录在启动SpringBoot项目时报如下错误原因可能是1.yml中语法错误2.yml文件格式是GBK总结在启动S

idea maven编译报错Java heap space的解决方法

《ideamaven编译报错Javaheapspace的解决方法》这篇文章主要为大家详细介绍了ideamaven编译报错Javaheapspace的相关解决方法,文中的示例代码讲解详细,感兴趣的... 目录1.增加 Maven 编译的堆内存2. 增加 IntelliJ IDEA 的堆内存3. 优化 Mave

如何解决mmcv无法安装或安装之后报错问题

《如何解决mmcv无法安装或安装之后报错问题》:本文主要介绍如何解决mmcv无法安装或安装之后报错问题,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录mmcv无法安装或安装之后报错问题1.当我们运行YOwww.chinasem.cnLO时遇到2.找到下图所示这里3.

浅谈配置MMCV环境,解决报错,版本不匹配问题

《浅谈配置MMCV环境,解决报错,版本不匹配问题》:本文主要介绍浅谈配置MMCV环境,解决报错,版本不匹配问题,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录配置MMCV环境,解决报错,版本不匹配错误示例正确示例总结配置MMCV环境,解决报错,版本不匹配在col

Docker镜像pull失败两种解决办法小结

《Docker镜像pull失败两种解决办法小结》有时候我们在拉取Docker镜像的过程中会遇到一些问题,:本文主要介绍Docker镜像pull失败两种解决办法的相关资料,文中通过代码介绍的非常详细... 目录docker 镜像 pull 失败解决办法1DrQwWCocker 镜像 pull 失败解决方法2总

SpringBoot启动报错的11个高频问题排查与解决终极指南

《SpringBoot启动报错的11个高频问题排查与解决终极指南》这篇文章主要为大家详细介绍了SpringBoot启动报错的11个高频问题的排查与解决,文中的示例代码讲解详细,感兴趣的小伙伴可以了解一... 目录1. 依赖冲突:NoSuchMethodError 的终极解法2. Bean注入失败:No qu

springboot报错Invalid bound statement (not found)的解决

《springboot报错Invalidboundstatement(notfound)的解决》本文主要介绍了springboot报错Invalidboundstatement(not... 目录一. 问题描述二.解决问题三. 添加配置项 四.其他的解决方案4.1 Mapper 接口与 XML 文件不匹配