print Redshift loading error#23
print Redshift loading error#23jhuangtw wants to merge 4 commits intotoothrot:masterfrom jhuangtw:stl-load-error
Conversation
| target_connection.exec('ROLLBACK;') | ||
|
|
||
| target_connection.exec("CREATE TABLE public.#{target_connection.quote_ident(table.target_table_name)} (#{table.columns_for_create})") | ||
| print_last_redshift_loading_error if e.message.include?('stl_load_errors') |
There was a problem hiding this comment.
It seems like this will not print any errors that do not match. Will other kinds of errors fail silently?
|
Thanks! I left a few comments. Let me know what you think. |
|
Also, what's an example of the error message being caught? |
|
@toothrot thanks for reviewing. I've updated the pull request to improve the messaging. the last INFO line only prints if |
| puts "ERROR: Last entry in Redshift's 'stl_load_errors' table:" | ||
| print_last_redshift_loading_error | ||
| else | ||
| puts 'ERROR: Unhandled PG error:' |
There was a problem hiding this comment.
I still think this should "raise", right? If we aren't explicitly handling the exception, then we need to ensure it errors correctly. Otherwise, we may hit this over and over again for something we are not handling.
There was a problem hiding this comment.
@toothrot thanks for the feedback. please take a look at the new snapshot.
|
@toothrot how's this one looking? |
|
@toothrot ping? |
|
I think I want to take another pass at this before merging it. I'll do that this week. Sorry for the delay. |
|
@toothrot ping :) |
#3