linux - How to use sqlite command to import large CSV file?
问题描述
The problem is that the node that runs this needs more RAM than I have. The size of the final table should be around ~300GB.
sqlite>.import data.csv myTable
sqlite> CREATE TABLE DX (
id INTEGER,
data1 TEXT,
data2 INTEGER,
...
);
解决方案
正如肖恩所说,您只需使用:
.open filename
这会在磁盘上创建数据库,这就是您导入时数据所在的位置。
推荐阅读
- python-3.x - 如何管理python中两个范围之间的值?
- android - Android Studio - Gradle 实现 (...) { exclude ... } 不起作用(无法从依赖项中排除组)
- unix - 将 teradata 结果导出到文件会添加空格
- java - 如何使用 Stream 对两个列表进行配对
- python - Django 的 AWS Elastic Beanstalk 500 内部服务器错误
- php - 与 PayPal-PHP-SDK 的订阅集成
- javascript - 限制同一页面内的垂直/水平滚动方向
- .net - 如何从通用 Windows 项目中引用 .NET Framework 4.6 类库?
- php - 如何在 img 标签中查看 src 的多个地址?
- arrays - Swift将数组中的随机元素返回到文本中