Обсуждение: [ADMIN] How to load data in psql DB

Поиск
Список
Период
Сортировка

[ADMIN] How to load data in psql DB

От
Ashwani Kumar B
Дата:

Hi

 

My requirement is to automatically load data which is in CSV format to psql DB table.

 

Normally in oracle I use to do it through sql-loader [sqlldr] . Do we have anything similar in psql.

 

Regards

Ashwani

Re: [ADMIN] How to load data in psql DB

От
Arnaud Gambonnet
Дата:
Hi,

pgloader should fit your need.


Regards,
AG.

2017-05-31 8:30 GMT+02:00 Ashwani Kumar B <ashwani.b.kumar@ericsson.com>:

Hi

 

My requirement is to automatically load data which is in CSV format to psql DB table.

 

Normally in oracle I use to do it through sql-loader [sqlldr] . Do we have anything similar in psql.

 

Regards

Ashwani


Re: [ADMIN] How to load data in psql DB

От
Ashwani Kumar B
Дата:

Hi

 

It will be helpful if you share  any sample script which works in crontab and also sample of control file.

 

Regards

Ashwani

 

From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Arnaud Gambonnet
Sent: Wednesday, May 31, 2017 1:03 PM
To: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] How to load data in psql DB

 

Hi,

 

pgloader should fit your need.

 

 

Regards,

AG.

 

2017-05-31 8:30 GMT+02:00 Ashwani Kumar B <ashwani.b.kumar@ericsson.com>:

Hi

 

My requirement is to automatically load data which is in CSV format to psql DB table.

 

Normally in oracle I use to do it through sql-loader [sqlldr] . Do we have anything similar in psql.

 

Regards

Ashwani

 

Re: [ADMIN] How to load data in psql DB

От
Samed YILDIRIM
Дата:
Hi Ashwani,
 
You can use COPY command and psql to load CSV file to PostgreSQL.
 
\copy zip_codes FROM '/path/to/csv/ZIP_CODES.txt' DELIMITER ',' CSV
 
If you create a simple cronjob, it will periodically load your datas from CSV.
 
https://stackoverflow.com/questions/2987433/how-to-import-csv-file-data-into-a-postgresql-table
 
Best regards.
 
 


İyi çalışmalar.
Samed YILDIRIM



31.05.2017, 10:57, "Ashwani Kumar B" <ashwani.b.kumar@ericsson.com>:

Hi

 

It will be helpful if you share  any sample script which works in crontab and also sample of control file.

 

Regards

Ashwani

 

From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Arnaud Gambonnet
Sent: Wednesday, May 31, 2017 1:03 PM
To: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] How to load data in psql DB

 

Hi,

 

pgloader should fit your need.

 

 

Regards,

AG.

 

2017-05-31 8:30 GMT+02:00 Ashwani Kumar B <ashwani.b.kumar@ericsson.com>:

Hi

 

My requirement is to automatically load data which is in CSV format to psql DB table.

 

Normally in oracle I use to do it through sql-loader [sqlldr] . Do we have anything similar in psql.

 

Regards

Ashwani