user1591328
user1591328

Reputation: 41

Redshift: COPY returns successful, but no data in table

I have a table with about 20 columns that I want to copy into redshift with from an S3 bucket as a csv. I run a copy command that runs successfully, but it returns "0 lines loaded".

I've been stumped on this for a while and I'd appreciate any help. I can share the table schema and a portion of the csv, if necessary (though, I'd like to avoid it if possible)

Any idea why this would be?

Upvotes: 3

Views: 3697

Answers (1)

Naveen Vijay
Naveen Vijay

Reputation: 16540

It happened sometime for me. The console shows that the Load Process is successful but the table not loaded.

Can you do a SELECT * FROM STL_LOAD_ERRORS and see if there are any rows corresponding to your load job. Basically the STL_LOAD_ERRORS keeps a log about all the load error with detailed info what is the exact error message and which column giving the error.

The job generally fails for me due to the reasons like Delimiter problem, Length of the Column etc.

Upvotes: 2

Related Questions