Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YqiZ8-00040i-Lj for pgsql-admin@arkaria.postgresql.org; Fri, 08 May 2015 13:43:46 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YqiZ7-0000E3-DB for pgsql-admin@arkaria.postgresql.org; Fri, 08 May 2015 13:43:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YqFMb-0004DS-8E for pgsql-admin@postgresql.org; Thu, 07 May 2015 06:32:53 +0000 Received: from mwork.nabble.com ([162.253.133.43]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1YqFMN-0004SH-1x for pgsql-admin@postgresql.org; Thu, 07 May 2015 06:32:48 +0000 Received: from msam.nabble.com (unknown [162.253.133.85]) by mwork.nabble.com (Postfix) with ESMTP id 1A6771D789F3 for ; Wed, 6 May 2015 23:33:23 -0700 (PDT) Date: Wed, 6 May 2015 23:32:35 -0700 (MST) From: phuongnh2 To: pgsql-admin@postgresql.org Message-ID: <1430980355141-5848263.post@n5.nabble.com> Subject: Issue import (COPY) data by between miss lines MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org 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,so= 6@vng.com.vn,N=E1=BA=A1p ruby cho 704450787.,https://pay6.zing.vn/OrderResult.php?platform=3D&game_id=3DFARM&= item_id=3DcnVieQ=3D=3D,https://pay6.zing.vn/OrderResult.php?platform=3D&gam= e_id=3DFARM&item_id=3DcnVieQ=3D=3D,https://pay6.zing.vn/OrderResult.php?pla= tform=3D&game_id=3DFARM&item_id=3DcnVieQ=3D=3D,G6MOBILEkiMicJopM34kcam,bbac= 3d3f2615fcd1f1f4a9fe3a2c0c45bac009ab,,1,123P1504161455496,https://online.ba= nknetvn.com.vn/pg/transprocess?Trans_id=3Dc98d0f1693a49312b9011615066346a8,= 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@vng.com.vn,N=E1= =BA=A1p ruby cho 704443473.,https://pay6.zing.vn/OrderResult.php?platform=3D&game_id=3DFARM&= item_id=3DcnVieQ=3D=3D,https://pay6.zing.vn/OrderResult.php?platform=3D&gam= e_id=3DFARM&item_id=3DcnVieQ=3D=3D,https://pay6.zing.vn/OrderResult.php?pla= tform=3D&game_id=3DFARM&item_id=3DcnVieQ=3D=3D,G6MOBILEkiMicJopM34kcam,0b44= 59ff26e11f4bf8bede11b4ee0129e42a2e25,,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,so= 6@vng.com.vn,N=E1=BA=A1p ruby cho 704293984.,https://pay6.zing.vn/OrderResult.php?platform=3D&game_id=3DFARM&= item_id=3DcnVieQ=3D=3D,https://pay6.zing.vn/OrderResult.php?platform=3D&gam= e_id=3DFARM&item_id=3DcnVieQ=3D=3D,https://pay6.zing.vn/OrderResult.php?pla= tform=3D&game_id=3DFARM&item_id=3DcnVieQ=3D=3D,G6MOBILEkiMicJopM34kcam,53e3= 082c97f26fc7632247d905471ac679ecf39b,,1,123P1504161455511,https://online.ba= nknetvn.com.vn/pg/transprocess?Trans_id=3D0c23fe272e3fb15460f9153899648853,= f6f7bff5dfc7f2d9bcd4bd2a98761e1911cf8530,Tao don hang thanh cong,2015-04-16 09:38:51 my code:=20 COPY raw_table FROM '/data/scribe_log/CREATE_ORDER-2015-04-16_00009' WITH (FORMAT CSV, HEADER, DELIMITER E',', NULL '\n'); thanks, phuongnh2 =20 -- View this message in context: http://postgresql.nabble.com/Issue-import-COP= Y-data-by-between-miss-lines-tp5848263.html Sent from the PostgreSQL - admin mailing list archive at Nabble.com. --=20 Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin