pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ravi Krishna <srkrishna1@aol.com>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: COPY from a remote machine in Datastage
Date: Fri, 5 Oct 2018 10:05:56 -0400
Message-ID: <EB01BE67-FA95-4E66-9FC0-0F2B1219A4D1@aol.com> (raw)
In-Reply-To: <CAG8g3txvk2a34_Mw3BMgodCyaHBTGhiYQ07e0jx-E2t8OBRAFA@mail.gmail.com>
References: <1538733298001-0.post@n3.nabble.com>
	<68fdc7e7-3a29-ef03-fe5c-5971e357788c@portavita.eu>
	<CAG8g3txvk2a34_Mw3BMgodCyaHBTGhiYQ07e0jx-E2t8OBRAFA@mail.gmail.com>


We are doing a POC of using Datastage with PG using ODBC.  

Problem to solve:  How to load a large CSV file using COPY command.  The file is on the client machine.

A typical SQL syntax of a copy coming from a remote machine  COPY TABLE FROM STDIN WITH CSV HEADER

Question is, how to make the contents of the file available as STDIN in a SQL.  It is easy in a shell.



view thread (7+ messages)  latest in thread

Message-ID: <EB01BE67-FA95-4E66-9FC0-0F2B1219A4D1@aol.com>
Permalink:  ../EB01BE67-FA95-4E66-9FC0-0F2B1219A4D1@aol.com/
Also on:    postgresql.org/message-id/EB01BE67-FA95-4E66-9FC0-0F2B1219A4D1@aol.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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: srkrishna1@aol.com
  Subject: Re: COPY from a remote machine in Datastage
  In-Reply-To: <EB01BE67-FA95-4E66-9FC0-0F2B1219A4D1@aol.com>
  References: <1538733298001-0.post@n3.nabble.com> <68fdc7e7-3a29-ef03-fe5c-5971e357788c@portavita.eu> <CAG8g3txvk2a34_Mw3BMgodCyaHBTGhiYQ07e0jx-E2t8OBRAFA@mail.gmail.com> <EB01BE67-FA95-4E66-9FC0-0F2B1219A4D1@aol.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