Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gITSM-0001ai-AY for pgsql-general@arkaria.postgresql.org; Fri, 02 Nov 2018 07:01:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gITSK-0002jL-Qi for pgsql-general@arkaria.postgresql.org; Fri, 02 Nov 2018 07:01:20 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gITSK-0002jE-Er for pgsql-general@lists.postgresql.org; Fri, 02 Nov 2018 07:01:20 +0000 Received: from hermes.gatewaynet.com ([193.92.121.98]) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gITSG-0004qa-2y for pgsql-general@lists.postgresql.org; Fri, 02 Nov 2018 07:01:19 +0000 Received: from smadev.internal.net (pc131.internal.net [10.9.200.131]) by hermes.gatewaynet.com (8.14.3/8.14.3/Debian-9.4) with ESMTP id wA2716hr001789 for ; Fri, 2 Nov 2018 09:01:11 +0200 Received: from smadev.internal.net (smadev [10.9.200.131]) by smadev.internal.net (8.15.2/8.15.2) with ESMTP id wA2716r0081124 for ; Fri, 2 Nov 2018 09:01:06 +0200 (EET) (envelope-from achill@matrix.gatewaynet.com) Subject: Re: Copy data from DB2 (Linux) to PG To: pgsql-general@lists.postgresql.org References: <277119983.568633.1541093278753.ref@mail.yahoo.com> <277119983.568633.1541093278753@mail.yahoo.com> From: Achilleas Mantzios Message-ID: <6bab3754-0751-03a8-6fdf-c55c3865ef38@matrix.gatewaynet.com> Date: Fri, 2 Nov 2018 09:01:06 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.0.1 MIME-Version: 1.0 In-Reply-To: <277119983.568633.1541093278753@mail.yahoo.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Virus-Scanned: clamav-milter 0.98.7 at hermes X-Virus-Status: Clean X-Spam-Status: No, score=-29.0 required=5.0 tests=ALL_TRUSTED,DYN_HAM_COORD, DYN_HAM_IT,DYN_HAM_NAUTICAL autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on hermes.gatewaynet.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 1/11/18 7:27 μ.μ., Ravi Krishna wrote: > I have a project to develop a script/tool to copy data from DB2 to PG. The approach I am thinking is > > 1. Export data from db2 in a text file, with, say pipe as delimiter. > 2. Load the data from the text file to PG using COPY command. > > In order to make it faster I can parallelize export and load with upto X number of tables concurrently. > > Is there a tool in which I can avoid first exporting and then loading. I think one way I can do it is by > using pipes by which I can export from db2 to a pipe and simultaneously load it to PG using COPY. https://pgloader.io/ > > Any other tool for this job? > > thanks. > -- Achilleas Mantzios IT DEV Lead IT DEPT Dynacom Tankers Mgmt