seamusabshere/data_miner

mysql cli errors aren't handled

Closed this issue · 1 comments

rather than blowing up on the missing column, this should have blown up when the mysql cli command failed

vagrant@vagrantbase:~/cm1$ rake data_miner:run RESOURCES=AirConditionerUse DONT_RAISE=true
(in /home/vagrant/cm1)
DEPRECATION WARNING: Base#before_save has been deprecated, please use Base.before_save :method instead. (called from /home/vagrant/.bundle/ruby/1.8/gems/delayed_job-1.8.5/lib/delayed/job.rb:275)
ERROR 1064 (42000) at line 1 in file: '/tmp/0.21243237647898': You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       "http://ww' at line 1
rake aborted!
No such column: residential_energy_consumption_survey_responses.residence_class

(See full trace by running task with --trace)

we don't use mysql like this anymore---we use taps