How to bulk insert a CSV file into SQLite C#

前端 未结 5 1957
别那么骄傲
别那么骄傲 2020-12-10 06:12

I have seen similar questions (1, 2), but none of them discuss how to insert CSV files into SQLite. About the only thing I could think of doing is to use a CSVDataAdap

5条回答
  •  悲&欢浪女
    2020-12-10 07:09

    You can use any of a number of tools to migrate data from a .csv file to a database, including:

    • SQL Workbench, using the WbCopy command
    • an ETL tool, like Pentaho Data Integration
    • DDLUtils

    Note: the first and third solution require that you access the .csv file through a jdbc interface.

    All of these will allow you to tweak the migration process to some degree (e.g. batch size) and all of them assume you want to do the migration manually, rather than from running C# code (which would complicate things a bit).

提交回复
热议问题