-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
print Redshift loading error #23
base: master
Are you sure you want to change the base?
Conversation
|
||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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