activewarehouse / activewarehouse-etl-sample

A place where you will find a sample of use of ActiveWarehouse-ETL
40 stars 9 forks source link

file not found error #7

Open OpenCoderX opened 12 years ago

OpenCoderX commented 12 years ago

I finally got the etl sample application installed and tests running on Ubuntu 11.10. When I run 'bundle exec etl etl/process_all.ebf' I get this:

<Executing post processes /home/adamar/.rvm/gems/ruby-1.9.3-p125@aw-etl-sample/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:243:inquery': Mysql2::Error: File '/home/adamar/code/activewa rehouse-etl-sample/etl/date_dimension.txt' not found (Errcode: 13): LOAD DATA INFILE '/home/adamar/code/activewarehouse-etl-sample/etl/date_dimension.txt' INTO TABLE date_dimension FIELDS TERMINATED BY ',' (date,month,day_of_week,day_of_week_as_number,year,year_and_month,sql_date_stamp,week,quarter,semester) (ActiveRecord::StatementInvalid) from /home/adamar/.rvm/gems/ruby-1.9.3-p125@aw-etl-sample/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:243:in block in execute' from /home/adamar/.rvm/gems/ruby-1.9.3-p125@aw-etl-sample/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:280:inblock in log' from /home/adamar/.rvm/gems/ruby-1.9.3-p125@aw-etl-sample/gems/activesupport-3.2.2/lib/active_support/notifications/instrumenter.rb:20:in instrument' from /home/adamar/.rvm/gems/ruby-1.9.3-p125@aw-etl-sample/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:275:inlog' from /home/adamar/.rvm/gems/ruby-1.9.3-p125@aw-etl-sample/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:243:in execute' from /home/adamar/.rvm/gems/ruby-1.9.3-p125@aw-etl-sample/gems/activerecord-3.2.2/lib/active_record/connection_adapters/mysql2_adapter.rb:211:inexecute' from /home/adamar/.rvm/gems/ruby-1.9.3-p125@aw-etl-sample/gems/adapter_extensions-1.0.0.rc1/lib/adapter_extensions/adapters/mysql_adapter.rb:68:in do_bulk_load' from /home/adamar/.rvm/gems/ruby-1.9.3-p125@aw-etl-sample/gems/adapter_extensions-1.0.0.rc1/lib/adapter_extensions/adapters/abstract_adapter.rb:19:inbulk_load' from /home/adamar/.rvm/gems/ruby-1.9.3-p125@aw-etl-sample/gems/activewarehouse-etl-1.0.0.rc1/lib/etl/processor/bulk_import_processor.rb:85:in block in process' from /home/adamar/.rvm/gems/ruby-1.9.3-p125@aw-etl-sample/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:192:intransaction' from /home/adamar/.rvm/gems/ruby-1.9.3-p125@aw-etl-sample/gems/activewarehouse-etl-1.0.0.rc1/lib/etl/processor/bulk_import_processor.rb:70:in process' from /home/adamar/.rvm/gems/ruby-1.9.3-p125@aw-etl-sample/gems/activewarehouse-etl-1.0.0.rc1/lib/etl/engine.rb:526:inblock in post_process' from /home/adamar/.rvm/gems/ruby-1.9.3-p125@aw-etl-sample/gems/activewarehouse-etl-1.0.0.rc1/lib/etl/engine.rb:525:in each' from /home/adamar/.rvm/gems/ruby-1.9.3-p125@aw-etl-sample/gems/activewarehouse-etl-1.0.0.rc1/lib/etl/engine.rb:525:inpost_process' from /home/adamar/.rvm/gems/ruby-1.9.3-p125@aw-etl-sample/gems/activewarehouse-etl-1.0.0.rc1/lib/etl/engine.rb:459:in process_control' from /home/adamar/.rvm/gems/ruby-1.9.3-p125@aw-etl-sample/gems/activewarehouse-etl-1.0.0.rc1/lib/etl/engine.rb:267:inprocess' from /home/adamar/.rvm/gems/ruby-1.9.3-p125@aw-etl-sample/gems/activewarehouse-etl-1.0.0.rc1/lib/etl/engine.rb:264:in process' from /home/adamar/.rvm/gems/ruby-1.9.3-p125@aw-etl-sample/gems/activewarehouse-etl-1.0.0.rc1/lib/etl/batch/directives.rb:41:indo_execute' from /home/adamar/.rvm/gems/ruby-1.9.3-p125@aw-etl-sample/gems/activewarehouse-etl-1.0.0.rc1/lib/etl/batch/directives.rb:15:in execute' from /home/adamar/.rvm/gems/ruby-1.9.3-p125@aw-etl-sample/gems/activewarehouse-etl-1.0.0.rc1/lib/etl/batch/batch.rb:90:inblock in execute' from /home/adamar/.rvm/gems/ruby-1.9.3-p125@aw-etl-sample/gems/activewarehouse-etl-1.0.0.rc1/lib/etl/batch/batch.rb:89:in each' from /home/adamar/.rvm/gems/ruby-1.9.3-p125@aw-etl-sample/gems/activewarehouse-etl-1.0.0.rc1/lib/etl/batch/batch.rb:89:inexecute' from /home/adamar/.rvm/gems/ruby-1.9.3-p125@aw-etl-sample/gems/activewarehouse-etl-1.0.0.rc1/lib/etl/engine.rb:292:in process_batch' from /home/adamar/.rvm/gems/ruby-1.9.3-p125@aw-etl-sample/gems/activewarehouse-etl-1.0.0.rc1/lib/etl/engine.rb:268:inprocess' from /home/adamar/.rvm/gems/ruby-1.9.3-p125@aw-etl-sample/gems/activewarehouse-etl-1.0.0.rc1/lib/etl/engine.rb:264:in process' from /home/adamar/.rvm/gems/ruby-1.9.3-p125@aw-etl-sample/gems/activewarehouse-etl-1.0.0.rc1/lib/etl/engine.rb:55:inprocess' from /home/adamar/.rvm/gems/ruby-1.9.3-p125@aw-etl-sample/gems/activewarehouse-etl-1.0.0.rc1/lib/etl/commands/etl.rb:82:in block in execute' from /home/adamar/.rvm/gems/ruby-1.9.3-p125@aw-etl-sample/gems/activewarehouse-etl-1.0.0.rc1/lib/etl/commands/etl.rb:80:ineach' from /home/adamar/.rvm/gems/ruby-1.9.3-p125@aw-etl-sample/gems/activewarehouse-etl-1.0.0.rc1/lib/etl/commands/etl.rb:80:in execute' from /home/adamar/.rvm/gems/ruby-1.9.3-p125@aw-etl-sample/gems/activewarehouse-etl-1.0.0.rc1/lib/etl/commands/etl.rb:90:in<top (required)>' from /home/adamar/.rvm/gems/ruby-1.9.3-p125@aw-etl-sample/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in require' from /home/adamar/.rvm/gems/ruby-1.9.3-p125@aw-etl-sample/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:inblock in require' from /home/adamar/.rvm/gems/ruby-1.9.3-p125@aw-etl-sample/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:236:in load_dependency' from /home/adamar/.rvm/gems/ruby-1.9.3-p125@aw-etl-sample/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:inrequire' from /home/adamar/.rvm/gems/ruby-1.9.3-p125@aw-etl-sample/gems/activewarehouse-etl-1.0.0.rc1/bin/etl:28:in <top (required)>' from /home/adamar/.rvm/gems/ruby-1.9.3-p125@aw-etl-sample/bin/etl:19:inload' from /home/adamar/.rvm/gems/ruby-1.9.3-p125@aw-etl-sample/bin/etl:19:in <main>'>

The file is there and I can use that exact path to 'gedit path here' and view the file. Any suggestions...

thbar commented 12 years ago

Hi Chris,

thanks for reporting this!

I googled a bit and it may be related to a MySQL configuration issue or something.

See http://ubuntuforums.org/showthread.php?t=822084 in particular.

If you can't fix this, you can try to enable :local_infile here https://github.com/activewarehouse/adapter_extensions/blob/master/lib/adapter_extensions/adapters/mysql_adapter.rb#L48

This should go like this I think (didn't test though):

post_process :bulk_import, { :file => bulk_load_file, :columns => columns,

Be sure to read about the security implications if you do this in production:

http://dev.mysql.com/doc/refman/5.0/en/load-data-local.html

And sidenote: the sample has a known issue with "duplicates user 'Adam'". If you meet this just delete the database and recreate it for now (or I'll welcome a pull-request if you fix it!)

Let me know if it works for you!

Thibaut

http://www.logeek.fr