将非常大的文本文件加载到我的sql表中

发布于 2024-12-09 20:44:13 字数 254 浏览 0 评论 0原文

我有一个 6.2 GB 的非常大的文本文件。我已使用以下命令将其加载到 mysql 中的表中 加载数据本地infile'sample.txt' 进入以 ',' 结尾的表 table1 字段 (大约花了20分钟)但是转储不成功,数据不可读且没有意义。我有一个类似的文件,但 csv 格式的文件较小,并且可以成功地将其加载到 sql 表中。我无法打开大文本文件,如何在不打开的情况下将文本转换为 csv?或者任何人都可以分享成功将文本文件加载到 mysql 表的想法

I have a very large text file of 6.2 GB. I have loaded this to a table in mysql using
load data local infile 'sample.txt'
into table table1 fields terminated by ','
(It took about 20 mins)But the dump was not successful and the data is not readable and not meaningful. I had a similar file but of smaller size in csv format and could successfully load that into sql table. I am unable to open the large text file, How should I convert the text to csv without opening it? or Can anyone share an idea to successfully load the text file to mysql table

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文