pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: phuongnh2 <phuongnh2@vng.com.vn>
To: pgsql-admin@postgresql.org
Subject: Issue import (COPY) data by between miss lines
Date: Wed, 6 May 2015 23:32:35 -0700 (MST)
Message-ID: <1430980355141-5848263.post@n5.nabble.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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@vng.com.vn,Nạp
ruby cho
704450787.,https://pay6.zing.vn/OrderResult.php?platform=&game_id=FARM&item_id=cnVieQ==,https://pay6.zi...
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@vng.com.vn,Nạp
ruby cho
704443473.,https://pay6.zing.vn/OrderResult.php?platform=&game_id=FARM&item_id=cnVieQ==,https://pay6.zi...
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@vng.com.vn,Nạp
ruby cho
704293984.,https://pay6.zing.vn/OrderResult.php?platform=&game_id=FARM&item_id=cnVieQ==,https://pay6.zi...
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.


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



view thread (4+ messages)  latest in thread

Message-ID: <1430980355141-5848263.post@n5.nabble.com>
Permalink:  ../1430980355141-5848263.post@n5.nabble.com/
Also on:    postgresql.org/message-id/1430980355141-5848263.post@n5.nabble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: phuongnh2@vng.com.vn
  Subject: Re: Issue import (COPY) data by between miss lines
  In-Reply-To: <1430980355141-5848263.post@n5.nabble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox