Re: COPY from a remote machine in Datastage - Mailing list pgsql-general

From Josef Šimánek
Subject Re: COPY from a remote machine in Datastage
Date
Msg-id CAFp7Qwp+WLSMOpd96EGZufMN99GnPB=kaAot_7bTct97bYxYxw@mail.gmail.com
Whole thread Raw
In response to COPY from a remote machine in Datastage  (Ravi Krishna <srkrishna1@aol.com>)
Responses Re: COPY from a remote machine in Datastage  (Ravi Krishna <srkrishna1@aol.com>)
List pgsql-general
Hello, if you need to use COPY command from remote machine and you use some libpq bindings (aka ruby pg gem for example), you can use functions associated with COPY command (https://www.postgresql.org/docs/10/static/libpq-copy.html). They should be provided by bindings of postgres library you're using.

If you can share more info, at least how do you access postgres (via Ruby gem for example or from client's console), I can try to be more descriptive.

Josef

pá 5. 10. 2018 v 16:06 odesílatel Ravi Krishna <srkrishna1@aol.com> napsal:

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.

pgsql-general by date:

Previous
From: Ravi Krishna
Date:
Subject: COPY from a remote machine in Datastage
Next
From: Ravi Krishna
Date:
Subject: Re: COPY from a remote machine in Datastage