Re: create batch script to import into postgres tables

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Pepe TD Vo <pepevo(at)yahoo(dot)com>, Pgsql-general <pgsql-general(at)postgresql(dot)org>, Pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: create batch script to import into postgres tables
Date: 2020-06-16 14:24:57
Message-ID: 1f5f4fd6-ad22-4823-c922-17a021c2c0d7@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

On 6/16/20 7:20 AM, Pepe TD Vo wrote:
> good morning experts,
>
> I nêd to set up a batch script to import multi csv files to import them
> to Postgres tables.  Each csv files will be named table1_todaydate.csv,
> table2_todaydate.csv, etc... tablen_todaydate.csv.  Each csv file will
> import to its table and how do I execute the script to called psql from
> AWS?  Do I need to create each batch file for import each table?

You have psql installed on your local(Windows?) machine?

Or are you using psql in your AWS instance?

>
> all export file is store in c:\export\files\
>
> thank you.
>
> Bach-Nga
>
>
>
>
>
>
> **
> *Bach-Nga
>
> *No one in this world is pure and perfect.  If you avoid people for
> their mistakes you will be alone. So judge less, love, and forgive
> more.EmojiEmojiEmoji
> To call him a dog hardly seems to do him justice though in as much as he
> had four legs, a tail, and barked, I admit he was, to all outward
> appearances. But to those who knew him well, he was a perfect gentleman
> (Hermione Gingold)
>
> **Live simply **Love generously **Care deeply **Speak kindly.
> *** Genuinely rich *** Faithful talent *** Sharing success
>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Victor Sudakov 2020-06-16 14:50:49 Re: Upgrade streaming replication and log-shipping standby servers
Previous Message Pepe TD Vo 2020-06-16 14:20:56 create batch script to import into postgres tables

Browse pgsql-general by date

  From Date Subject
Next Message Jean Gabriel 2020-06-16 14:25:55 PSQL console encoding
Previous Message Pepe TD Vo 2020-06-16 14:20:56 create batch script to import into postgres tables