Re: [GENERAL] Load multiple CSV file in Postgres using COPY

2017-02-17 Thread Adrian Klaver
On 02/17/2017 05:55 AM, Murtuza Zabuawala wrote: Thank you All for your suggestions, But I was looking for solution around COPY command only. Sort of a cheat: https://www.postgresql.org/docs/9.6/static/sql-copy.html PROGRAM A command to execute. In COPY FROM, the input is read from

Re: [GENERAL] Load multiple CSV file in Postgres using COPY

2017-02-17 Thread Murtuza Zabuawala
Thank you All for your suggestions, But I was looking for solution around COPY command only. -- Regards, Murtuza Zabuawala EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company On Fri, Feb 17, 2017 at 3:06 PM, Alexander Shchapov wrote: > You might

Re: [GENERAL] Load multiple CSV file in Postgres using COPY

2017-02-17 Thread Alexander Shchapov
You might want to look into pgloader: http://pgloader.io/ On Fri, Feb 17, 2017 at 7:26 AM, Murtuza Zabuawala wrote: > Hi, > > Is there any way to load multiple CSV files at once using single COPY > command? > > I have scenario where I have to load multiple

Re: [GENERAL] Load multiple CSV file in Postgres using COPY

2017-02-16 Thread Magnus Hagander
On Feb 17, 2017 06:53, "John R Pierce" wrote: On 2/16/2017 9:43 PM, Magnus Hagander wrote: > Perhaps something like "COPY FROM PROGRAM 'cat /path/*.csv'" would work for you? he's using HEADER, so cat wouldn't work.he's also using MSDOS/WIndows style filenames, so cat

Re: [GENERAL] Load multiple CSV file in Postgres using COPY

2017-02-16 Thread John R Pierce
On 2/16/2017 9:43 PM, Magnus Hagander wrote: Perhaps something like "COPY FROM PROGRAM 'cat /path/*.csv'" would work for you? he's using HEADER, so cat wouldn't work.he's also using MSDOS/WIndows style filenames, so cat won't work, anyways.. I'd suggest using something like

Re: [GENERAL] Load multiple CSV file in Postgres using COPY

2017-02-16 Thread Magnus Hagander
On Fri, Feb 17, 2017 at 6:26 AM, Murtuza Zabuawala < murtuza.zabuaw...@enterprisedb.com> wrote: > Hi, > > Is there any way to load multiple CSV files at once using single COPY > command? > > I have scenario where I have to load multiple files, > > COPY prdxgdat FROM 'Z:/data-2016-04-01.csv' WITH