Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jlCWV-0007lT-AN for pgsql-admin@arkaria.postgresql.org; Tue, 16 Jun 2020 14:25:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jlCWU-0004og-63 for pgsql-admin@arkaria.postgresql.org; Tue, 16 Jun 2020 14:25:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jlCWS-0004oV-NG; Tue, 16 Jun 2020 14:25:09 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jlCWM-0006fq-SF; Tue, 16 Jun 2020 14:25:08 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 217FE3E3; Tue, 16 Jun 2020 10:24:59 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Tue, 16 Jun 2020 10:24:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=e 0fFzdpsP+qeVVNbVxV1QoEgXn5g77wV8go/RMhrHio=; b=kN4nti5FwRP+BiwUP gSgB61954IA8EH91xx1+WWILnLEZBhSVSF83a6FgdsQKOuR0U4JBr6fpftiip6jx smR7j34+tARbCUOCCt79z3t36a0pxRMDMwSst91x5hkbXISfDvuVkjVERUbU0Y/9 hzJ7TZpZcgpS9lYcYnF9bgvRkA41UmiW8S3Iv6HjT/OvNyX+FETLEpfxko/ejpni TU2lLyYMRvSxAOlyyKcHfkcWmpocy4Xcch2Ne/sJfFI3Hmok3SKnBTlIh3gBkzhM G+RyJp3RDpHIsPJCU92BdjovGiluZy5G6DJ4wV8F1i1KyOyIpaSJBTKgjoZQDa3Q xm7xw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=e0fFzdpsP+qeVVNbVxV1QoEgXn5g77wV8go/RMhrH io=; b=n9zSNR9VwfOh6rSXuD7/B/ageSFclR/P6aqCEp+QOTwVfVr/aPiB8jM9V IvvSkUbwwbQJuFB+yzEcJ+kLfzrVYTykdYz7mR4htBbDmbi4qb8e7jIGLuH6eBiJ Z/yWNR7hSJhQ7WfXicuJ7r8LarH1j1AkRVVcK511w30mF2z8Z+l0wHFyE1Rdv61b 3RQqaEx634GtRq5MxCMSs7KOFPKZVt15ni498uyDDzmi2tgi9gbfuQLEWTTsQk80 EPqC5vPk6oVwz/irCFBvwVGlUYWdnY9W8eVNjM+c3wdFLADqjVv47BM5ExXq1zLm na4p/1hjZfmqZUwkvpb+zrbvhTSJQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudejtddgjeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthekredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpeevveefveefueegffekkefhgeeiueffgfetueejvdfg hfeujeejhfekjeelgedtgeenucfkphepjeehrddujedvrdehrddvfedunecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgr vhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Received: from [192.168.1.3] (75-172-5-231.tukw.qwest.net [75.172.5.231]) by mail.messagingengine.com (Postfix) with ESMTPA id F310330618BF; Tue, 16 Jun 2020 10:24:57 -0400 (EDT) Subject: Re: create batch script to import into postgres tables To: Pepe TD Vo , Pgsql-general , Pgsql-admin References: <866581879.1147164.1592317256828.ref@mail.yahoo.com> <866581879.1147164.1592317256828@mail.yahoo.com> From: Adrian Klaver Message-ID: <1f5f4fd6-ad22-4823-c922-17a021c2c0d7@aklaver.com> Date: Tue, 16 Jun 2020 07:24:57 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <866581879.1147164.1592317256828@mail.yahoo.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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.klaver@aklaver.com