Skip to content
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

add a few more cast types using character varying #29

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

nas887
Copy link

@nas887 nas887 commented Dec 11, 2017

add a few more types.

update_tables.import_table(table)
update_tables.import_table(table)
rescue StandardError => e
retry unless retries += 1 < 3
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be retry if retries += 1 < 3 ?

Can you also log the error?

@@ -22,11 +22,17 @@ def self.update_tables
update_tables = PostgresToRedshift.new

update_tables.tables.each do |table|
target_connection.exec("CREATE TABLE IF NOT EXISTS #{schema}.#{target_connection.quote_ident(table.target_table_name)} (#{table.columns_for_create})")
begin
retries ||= 3
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make this configurable, and default to 1?

@toothrot
Copy link
Owner

Looks good, can you fix the build? Looks like it just needs another bundle install, or the Gemfile itself is out of date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants