Hello lad
Hello lad

Reputation: 18790

Redshift copy doesn't insert data into my table

I have table SampleTable

and run the following Redshift command through a SQL Client (JackDB)

copy SampleTable
from 's3://bucket-name/backup/data.csv.gz'
credentials 'aws_access_key_id=xxx;aws_secret_access_key=xxx'
gzip
csv;

the command does return

Executed successfully Updated 0 rows in 2.771 seconds.

but no data are inserted into empty table SampleTable

select count(*)
from SampleTabe

return 0

there are 100MB data in data.csv.gz

Upvotes: 1

Views: 1916

Answers (1)

Hello lad
Hello lad

Reputation: 18790

solved by myself, the data do not correspond to the query.

I should include delimiter to overwrite the default and IGNOREHEADER 1 to skip the csv header.

just bothered by the fact that no stl_load_error is recorded in this case

Upvotes: 1

Related Questions