如何处理MySQL中的BULK加载错误 [英] How to handle BULK Load Error in MySQL

查看:80
本文介绍了如何处理MySQL中的BULK加载错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI,



我试图进行批量加载过程,输入文件包含大约10行的行。

我如何处理,如果有的话在mYSQL中进行批量加载时发生错误



例如:



我有一个CSV文件包含大约30万行。

如何将错误行数据记录到任何表或文件中?



Am trying to do bulkload process, input file contain around 10lakhs lines.
How do i handle , if any error occurs while doing bulk load in mYSQL

For ex:

I have a CSV File which contain around 30 lakhs lines .
How do i log the error line datas into any table or file?

推荐答案

LOAD DATA LOCAL INFILE ... 会像其他任何mySql命令一样给你错误:

http://dev.mysql.com/doc/refman/4.1/en/loading-tables.html [ ^ ]



在任何情况下,建议您将输入文件分解为更易于管理的块并导入这些块,以便将错误本地化为该块。
LOAD DATA LOCAL INFILE ... will give you errors like any other mySql command :
http://dev.mysql.com/doc/refman/4.1/en/loading-tables.html[^]

In any case you are advised to break up your input file into more manageable chunks and import those chunks so your errors will be localized to that chunk.


这篇关于如何处理MySQL中的BULK加载错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆