Re: COPY from a remote machine in Datastage

From: Edmundo Robles <edmundo(at)sw-argos(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: COPY from a remote machine in Datastage
Date: 2018-10-05 15:15:50
Message-ID: CAOXzpYCRBrp-yVDbAAgfXwDdHfc4SYv0JJkbDULfibY24FVPow@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

if you have ssh access to the client, you can do :
ssh user(at)client_host "cat /path_to/large_file.csv" | psql -d database
....

On Fri, Oct 5, 2018 at 9:06 AM Ravi Krishna <srkrishna1(at)aol(dot)com> wrote:

>
> 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.
>

--

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Durgamahesh Manne 2018-10-05 15:18:18 Regarding varchar max length in postgres
Previous Message Ravi Krishna 2018-10-05 14:37:17 Re: COPY from a remote machine in Datastage