PostgreSQL COPY:从CSV中删除前两行

时间:2016-05-21 23:01:43

标签: mysql postgresql csv import

每周我都会收到一些CSV文件,以便导入我的PostgreSQL数据库进行分析。问题是这些文件中的许多文件都带有标题行上方的安全免责声明行,如下所示:

This document contains Personal Identifying Information (PII) and is For Official Use Only (FOUO). It shall not be disclosed outside any...
"Last Name",Suffix,"First Name","Middle Name",DOB,"Work Email","Home Email","Employment Status",UPN,"Ship To Address","Ship To City"...

有没有办法让COPY语句跳过前两行,同时将文件的其余部分放入表中? MySQL具有IGNORE 2 LINES命令的LOAD DATA LOCAL子句; PostgreSQL有什么类似的东西吗?

0 个答案:

没有答案