Re: COPY from a remote machine in Datastage

Поиск
Список
Период
Сортировка
От Edmundo Robles
Тема Re: COPY from a remote machine in Datastage
Дата
Msg-id CAOXzpYCRBrp-yVDbAAgfXwDdHfc4SYv0JJkbDULfibY24FVPow@mail.gmail.com
обсуждение исходный текст
Ответ на COPY from a remote machine in Datastage  (Ravi Krishna <srkrishna1@aol.com>)
Список pgsql-general
if you have ssh access to the client, you can do :  
ssh  user@client_host "cat  /path_to/large_file.csv" | psql  -d database ....

On Fri, Oct 5, 2018 at 9:06 AM Ravi Krishna <srkrishna1@aol.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.


--

В списке pgsql-general по дате отправления:

Предыдущее
От: Ravi Krishna
Дата:
Сообщение: Re: COPY from a remote machine in Datastage
Следующее
От: Durgamahesh Manne
Дата:
Сообщение: Regarding varchar max length in postgres