From: | Guillaume Lelarge <guillaume(at)lelarge(dot)info> |
---|---|
To: | Mahesh Wadekar <maheshwadekar(at)gmail(dot)com> |
Cc: | pgsql-admin(at)lists(dot)postgresql(dot)org |
Subject: | Re: psql copy filename path wildcard |
Date: | 2020-05-04 09:30:39 |
Message-ID: | CAECtzeXFSHFV0Ei5h2phHMb0gWw7VkBb2oeM=TCwfmG6cmTWBA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Le lun. 4 mai 2020 à 09:40, Mahesh Wadekar <maheshwadekar(at)gmail(dot)com> a
écrit :
> Hi Team,
>
> I am copying data from S3 to local using psql copy command but file name
> path is daily changing. so i am trying to put '*' but its giving error.
>
> I am trying below command from psql prompt.
>
> copy tablename from
> 's3://S3-bucket-name//detailedconsumption/*/*/file.json' credentials
> 'aws_iam_role=arn:aws:iam::xxxxxxxx:role/RedshiftS3Role2' region 'xxxxx'
> GZIP CSV IGNOREHEADER 1 TIMEFORMAT 'auto' manifest;
>
> Below error message we got.
>
> ERROR: Problem reading manifest file - S3ServiceException:The specified
> key does not exist.,Status 404,Error NoSuchKey,Rid 81DF7C1A9B0BE7BF,ExtRid
> Cx+8oamynCoaG6IAMEbbgwGM1ngpCJSuJ/8az1nX/C2djLLlo2huhzLzQBAQrTORXoglc1zOO7E=,CanRetry
> 1
>
>
> Please suggest method in place of '*'.
>
>
Write a shell script to get the filepath and give it to psql. That's the
simplest thing to do.
--
Guillaume.
From | Date | Subject | |
---|---|---|---|
Next Message | Rajin Raj | 2020-05-04 11:29:43 | Deactivate/disable User id in Postgres |
Previous Message | Mahesh Wadekar | 2020-05-04 07:39:46 | psql copy filename path wildcard |