Re: How to load data in psql DB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
https://www.postgresql.org/docs/9.6/static/sql-copy.html
 
Best regards.
 
 


İyi çalışmalar.
Samed YILDIRIM



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

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@xxxxxxxxxxxxxx [mailto:pgsql-admin-owner@xxxxxxxxxxxxxx] On Behalf Of Arnaud Gambonnet
Sent: Wednesday, May 31, 2017 1:03 PM
To: pgsql-admin@xxxxxxxxxxxxxx
Subject: Re: 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@xxxxxxxxxxxx>:

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

 


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux