From: | phuongnh2 <phuongnh2(at)vng(dot)com(dot)vn> |
---|---|
To: | pgsql-admin(at)postgresql(dot)org |
Subject: | Issue import (COPY) data by between miss lines |
Date: | 2015-05-07 06:32:35 |
Message-ID: | 1430980355141-5848263.post@n5.nabble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Hi Admin,
I have issue import data (COPY). Data content between miss lines
Row 1: have 26 columns (DELIMITER BY ,)
Row 2: have 24 column (DELIMITER BY ,)
How to skip and write to log file this line ??
sample:
Row1:
20150416ATM11429151780752,G6MOBILE,123PVTB,FARM,704450787,50000,10.30.81.2,704450787,MTgyIExlIERhaSBoYW5oIC0gUTExIC0gVFAgSENN,M,1/1/1970,0978233650,so6(at)vng(dot)com(dot)vn,Nạp
ruby cho
704450787.,https://pay6.zing.vn/OrderResult.php?platform=&game_id=FARM&item_id=cnVieQ==,https://pay6.zing.vn/OrderResult.php?platform=&game_id=FARM&item_id=cnVieQ==,https://pay6.zing.vn/OrderResult.php?platform=&game_id=FARM&item_id=cnVieQ==,G6MOBILEkiMicJopM34kcam,bbac3d3f2615fcd1f1f4a9fe3a2c0c45bac009ab,,1,123P1504161455496,https://online.banknetvn.com.vn/pg/transprocess?Trans_id=c98d0f1693a49312b9011615066346a8,d3c516fb43a889ffa233674676188ff76e2957dd,Tao
don hang thanh cong,2015-04-16 09:36:22
Row2:
20150416ATM21429151915479,G6MOBILE,123PBAB,FARM,50000,10.30.81.2,704443473,MTgyIExlIERhaSBoYW5oIC0gUTExIC0gVFAgSENN,M,01687302683,so6(at)vng(dot)com(dot)vn,Nạp
ruby cho
704443473.,https://pay6.zing.vn/OrderResult.php?platform=&game_id=FARM&item_id=cnVieQ==,https://pay6.zing.vn/OrderResult.php?platform=&game_id=FARM&item_id=cnVieQ==,https://pay6.zing.vn/OrderResult.php?platform=&game_id=FARM&item_id=cnVieQ==,G6MOBILEkiMicJopM34kcam,0b4459ff26e11f4bf8bede11b4ee0129e42a2e25,,6203,,,,Khong
ho tro ngan hang da chon,2015-04-16 09:38:35
20150416ATM21429151929774,G6MOBILE,123PVTB,FARM,704293984,50000,10.30.81.2,704293984,MTgyIExlIERhaSBoYW5oIC0gUTExIC0gVFAgSENN,M,1/1/1970,0972198329,so6(at)vng(dot)com(dot)vn,Nạp
ruby cho
704293984.,https://pay6.zing.vn/OrderResult.php?platform=&game_id=FARM&item_id=cnVieQ==,https://pay6.zing.vn/OrderResult.php?platform=&game_id=FARM&item_id=cnVieQ==,https://pay6.zing.vn/OrderResult.php?platform=&game_id=FARM&item_id=cnVieQ==,G6MOBILEkiMicJopM34kcam,53e3082c97f26fc7632247d905471ac679ecf39b,,1,123P1504161455511,https://online.banknetvn.com.vn/pg/transprocess?Trans_id=0c23fe272e3fb15460f9153899648853,f6f7bff5dfc7f2d9bcd4bd2a98761e1911cf8530,Tao
don hang thanh cong,2015-04-16 09:38:51
my code:
COPY raw_table FROM '/data/scribe_log/CREATE_ORDER-2015-04-16_00009' WITH
(FORMAT CSV, HEADER, DELIMITER E',', NULL '\n');
thanks,
phuongnh2
--
View this message in context: http://postgresql.nabble.com/Issue-import-COPY-data-by-between-miss-lines-tp5848263.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
From | Date | Subject | |
---|---|---|---|
Next Message | phuongnh2 | 2015-05-07 06:56:37 | Re: Issue import (COPY) data by between miss lines |
Previous Message | phuongnh2 | 2015-05-07 02:40:00 | Re: Import csv file error with double newline |