导入失败,报错:“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

相关文章

MySQL安装时initializing database失败的问题解决

《MySQL安装时initializingdatabase失败的问题解决》本文主要介绍了MySQL安装时initializingdatabase失败的问题解决,文中通过图文介绍的非常详细,对大家的学... 目录问题页面:解决方法:问题页面:解决方法:1.勾选红框中的选项:2.将下图红框中全部改为英

Nginx启动失败:端口80被占用问题的解决方案

《Nginx启动失败:端口80被占用问题的解决方案》在Linux服务器上部署Nginx时,可能会遇到Nginx启动失败的情况,尤其是错误提示bind()to0.0.0.0:80failed,这种问题通... 目录引言问题描述问题分析解决方案1. 检查占用端口 80 的进程使用 netstat 命令使用 ss

IDEA编译报错“java: 常量字符串过长”的原因及解决方法

《IDEA编译报错“java:常量字符串过长”的原因及解决方法》今天在开发过程中,由于尝试将一个文件的Base64字符串设置为常量,结果导致IDEA编译的时候出现了如下报错java:常量字符串过长,... 目录一、问题描述二、问题原因2.1 理论角度2.2 源码角度三、解决方案解决方案①:StringBui

Python Jupyter Notebook导包报错问题及解决

《PythonJupyterNotebook导包报错问题及解决》在conda环境中安装包后,JupyterNotebook导入时出现ImportError,可能是由于包版本不对应或版本太高,解决方... 目录问题解决方法重新安装Jupyter NoteBook 更改Kernel总结问题在conda上安装了

pip install jupyterlab失败的原因问题及探索

《pipinstalljupyterlab失败的原因问题及探索》在学习Yolo模型时,尝试安装JupyterLab但遇到错误,错误提示缺少Rust和Cargo编译环境,因为pywinpty包需要它... 目录背景问题解决方案总结背景最近在学习Yolo模型,然后其中要下载jupyter(有点LSVmu像一个

Python安装时常见报错以及解决方案

《Python安装时常见报错以及解决方案》:本文主要介绍在安装Python、配置环境变量、使用pip以及运行Python脚本时常见的错误及其解决方案,文中介绍的非常详细,需要的朋友可以参考下... 目录一、安装 python 时常见报错及解决方案(一)安装包下载失败(二)权限不足二、配置环境变量时常见报错及

MySQL报错sql_mode=only_full_group_by的问题解决

《MySQL报错sql_mode=only_full_group_by的问题解决》本文主要介绍了MySQL报错sql_mode=only_full_group_by的问题解决,文中通过示例代码介绍的非... 目录报错信息DataGrip 报错还原Navicat 报错还原报错原因解决方案查看当前 sql mo

解决Spring运行时报错:Consider defining a bean of type ‘xxx.xxx.xxx.Xxx‘ in your configuration

《解决Spring运行时报错:Considerdefiningabeanoftype‘xxx.xxx.xxx.Xxx‘inyourconfiguration》该文章主要讲述了在使用S... 目录问题分析解决方案总结问题Description:Parameter 0 of constructor in x

解决IDEA使用springBoot创建项目,lombok标注实体类后编译无报错,但是运行时报错问题

《解决IDEA使用springBoot创建项目,lombok标注实体类后编译无报错,但是运行时报错问题》文章详细描述了在使用lombok的@Data注解标注实体类时遇到编译无误但运行时报错的问题,分析... 目录问题分析问题解决方案步骤一步骤二步骤三总结问题使用lombok注解@Data标注实体类,编译时

linux报错INFO:task xxxxxx:634 blocked for more than 120 seconds.三种解决方式

《linux报错INFO:taskxxxxxx:634blockedformorethan120seconds.三种解决方式》文章描述了一个Linux最小系统运行时出现的“hung_ta... 目录1.问题描述2.解决办法2.1 缩小文件系统缓存大小2.2 修改系统IO调度策略2.3 取消120秒时间限制3