首页 > 解决方案 > 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,
                   ...
                  );

标签: linuxsqlitecsvimport

解决方案


正如肖恩所说,您只需使用:

.open filename

这会在磁盘上创建数据库,这就是您导入时数据所在的位置。


推荐阅读