Best practices for importing large CSV files

前端 未结 10 864
攒了一身酷
攒了一身酷 2020-12-14 16:39

My company gets a set of CSV files full of bank account info each month that I need to import into a database. Some of these files can be pretty big. For example, one is abo

10条回答
  •  情书的邮戳
    2020-12-14 16:57

    If you are using Sql Server and have access to .NET then you can write a quick application to use the SQLBulkCopy class. I've used this in previous projects to get a lot of data into SQL very quickly. The SQLBulkCopy class makes use of SQL Server's BCP, so if you're using something other than .NET it may be worth looking into whether that option is open to you too. Not sure if you're using a DB other than SQL Server.

提交回复
热议问题