Mohamed Thowfeeq
Mohamed Thowfeeq

Reputation: 1

aws_s3.table_import_from_s3 returns error

Attempting to import CSV to postgres table, I got this error.

ERROR:  missing data for column "b"
CONTEXT:  COPY test, line 2: "<Error><Code>AccessDenied</Code><Message>User: arn:aws:sts::23534534233:assumed-role/abcRole..."
SQL statement "copy test  from '/rdsdbdata/extensions/aws_s3/amazon-s3-fifo-56756-34535354534-0' with (FORMAT CSV, HEADER, DELIMITER ',')"
SQL statement "SELECT aws_s3.table_import_from_s3(
        'test', 
        '', 
        '(FORMAT CSV, HEADER, DELIMITER '','')',
        'sample',
        '3_row.CSV',
        'us-east-1'
    )"
PL/pgSQL function load_csv_from_s3() line 3 at PERFORM 

SQL state: 22P04

This is my sample CSV file.

"a","b","fname","lname","c"
"2024","19","John","Smith","DWEFFFFFF"

Please help in identifying cause of the error.

Upvotes: 0

Views: 59

Answers (0)

Related Questions