将数据批量加载到sqlite?

Bulk load data into sqlite?(将数据批量加载到sqlite?)
本文介绍了将数据批量加载到sqlite?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有人对实用程序有任何提示,可用于将存储在分隔文本文件中的数据批量加载到 SQLite 数据库中?

Does anybody have any tips on utilities that can be used to bulk load data that is stored in delimited text files into an SQLite database?

理想情况下,可以从脚本等中作为独立程序调用的东西.

Ideally something that can be called as a stand-alone program from a script etc.

与我合作的一个团队有一个 Oracle 数据库,该数据库将把一堆数据转储到文件中,然后将该数据加载到 SQLite 数据库中以在移动设备上使用,并且正在寻找实现这种类型的最简单方法场景.

A group I work with has an Oracle Database that's going to dump a bunch of data out to file and then load that data into an SQLite database for use on a mobile device and are looking for the easiest way to implement that sort of scenario.

推荐答案

查看 sqite .import 命令 - 它完全可以做到这一点.
您可以使用 .separator 命令设置分隔符

Check out the sqite .import command - it does exacty this.
You can set the separator with the .separator command

sqlite3 myDatabase
create table myTable (a, b, c);
.separator ','
.import  myFile  myTable

这篇关于将数据批量加载到sqlite?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

FastAPI + Tortoise ORM + FastAPI Users (Python) - Relationship - Many To Many(FastAPI+Tortoise ORM+FastAPI用户(Python)-关系-多对多)
Window functions not working in pd.read_sql; Its shows error(窗口函数在pd.read_sql中不起作用;它显示错误)
(Closed) Leaflet.js: How I can Do Editing Geometry On Specific Object I Select Only?((已关闭)Leaflet.js:如何仅在我选择的特定对象上编辑几何图形?)
in sqlite update trigger with multiple if/Case Conditions(在具有多个IF/CASE条件的SQLite UPDATE触发器中)
Android: Why is Room so slow?(Android:为什么Room这么慢?)
Remote Procedure call failed with sql server 2008 R2(使用 sql server 2008 R2 的远程过程调用失败)