redshift: adapter: redshift database: applog host: *****.**********.ap-northeast-1.redshift.amazonaws.com port: 5439 username: app password: encoding: utf8 pool: 5 timeout: 30000 # タイムアウトは長めに ActiveRecord::Base.establish_connection(:redshift) result = ActiveRecord::Base.connection.execute "select * from table_name where log_date='#{d.strftime("%Y-%m-%d")}'" result.each{|record| p record # hash }