MySQL LOAD DATA INFILE: works, but unpredictable line terminator

前端 未结 7 928
走了就别回头了
走了就别回头了 2020-12-25 14:58

MySQL has a nice CSV import function LOAD DATA INFILE.

I have a large dataset that needs to be imported from CSV on a regular basis, so this feature is

7条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-25 15:32

    I'd just pre-process it. A global search/replace to change \r\n to \n done from a command line tool as part of the import process should be simple and performant.

提交回复
热议问题