From anthonyeden at gmail.com Sat Nov 17 07:40:51 2007 From: anthonyeden at gmail.com (Anthony Eden) Date: Sat, 17 Nov 2007 05:40:51 -0700 Subject: [Activewarehouse-discuss] processor class name lookup In-Reply-To: <8a6d52260710301049k6080f3dh7bd334462a8b3f67@mail.gmail.com> References: <8a6d52260710301049k6080f3dh7bd334462a8b3f67@mail.gmail.com> Message-ID: Point taken. I've updated all of the lookups in the SVN trunk so they use camelize instead of classify. V/r Anthony On Oct 30, 2007 10:49 AM, Colin Surprenant wrote: > Hi, > > Is there a particular reason why the processor lookup code in > ETL::Control::Context::transform uses the classify method instead of > camelize ?? > > The code in question is: (line 123 in etl/control/control.rb) > class_name = "#{transformer.to_s.classify}Transform" > > The problem is that if you define a custom transformer like let's say > "TagsTransform", when you try to invoke it using > transform :thefield, :tags > the controller will try to invoke the "TagTransform" class instead of > "TagsTransform". > > Thanks, > Colin. > > _______________________________________________ > Activewarehouse-discuss mailing list > Activewarehouse-discuss at rubyforge.org > http://rubyforge.org/mailman/listinfo/activewarehouse-discuss > > From anthonyeden at gmail.com Sat Nov 17 07:42:55 2007 From: anthonyeden at gmail.com (Anthony Eden) Date: Sat, 17 Nov 2007 05:42:55 -0700 Subject: [Activewarehouse-discuss] Top level roll-up In-Reply-To: References: Message-ID: I'd definitely avoid creating the dimension with "All". I believe that there does need to be support for the notion of "all" however I think it should be included automatically - no need to call it out in the hierarchy. V/r Anthony On Oct 30, 2007 2:42 PM, Marty Haught wrote: > I have a question on doing a top level roll-up programmatically. I > would like to have a top level called 'All' for several of my > hierarchies. Is there an easy way to do this using the TableReport? > I can fake it out by adding a column into the desired dimension with > every row having the string 'All' in it but this feels wrong. What > I'd love to do is this: > > define_hierarchy :my_hierarchy, [:all, :category, :name] > > The define_hierarchy method would understand that :all is reserved > and this means to show a single row roll-up at the top level. I am > new to data warehousing so perhaps what I'm asking for is > accomplished in another way. Thanks in advance for your replies. > > Cheers, > Marty > _______________________________________________ > Activewarehouse-discuss mailing list > Activewarehouse-discuss at rubyforge.org > http://rubyforge.org/mailman/listinfo/activewarehouse-discuss > From blake.mizerany at gmail.com Tue Nov 27 14:44:24 2007 From: blake.mizerany at gmail.com (Blake Mizerany) Date: Tue, 27 Nov 2007 11:44:24 -0800 Subject: [Activewarehouse-discuss] Rails 2.0 Message-ID: <7082474f0711271144q579265abtfc06e2ea4cba7a23@mail.gmail.com> Hi everyone, I'm currently working with the AW etl with Rails 2.0 rc1 frozen to vendor/rails. My etl scripts are: blake:~/Sites/metrics/etl blake$ find . . ./database.yml ./log_parser.rb ./update_logs.ctl ./updates_apache_log_parser.rb when I run: etl update_logs.ctl I get: blake:~/Sites/metrics/etl blake$ etl update_logs.ctl Using AdapterExtensions Starting ETL process initializing ETL engine Processing update_logs.ctl /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:263:in `load_missing_constant': uninitialized constant ActionView::Helpers::BasicObject (NameError) from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:452:in `const_missing' from /Users/blake/Sites/metrics/vendor/rails/actionpack/lib/action_view/helpers/prototype_helper.rb:816 from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `require' from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' from /Users/blake/Sites/metrics/vendor/rails/actionpack/lib/action_view/helpers/javascript_helper.rb:2 ... 61 levels... from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' from /opt/local/lib/ruby/gems/1.8/gems/activewarehouse-etl-0.9.0 /bin/etl:28 from /opt/local/bin/etl:16:in `load' from /opt/local/bin/etl:16 My ctl files looks like: $:.unshift(File.dirname(__FILE__)) require File.dirname(__FILE__) + '/../config/environment' require File.dirname(__FILE__) + '/updates_apache_log_parser' source :in, { :file => '', :parser => :updates_apache_log_parser }, {} destination :out, { :file => 'updates.txt', :separator => "\t" }, { :order => [:date_id, :uid] } post_process :bulk_import, { :file => 'updates.txt', :truncate => true, :columns => [:date_id, :uid], :target => { :adapter => 'mysql', :database => 'updates_development', :table => 'update_facts' } } I'm givin 'er all I got and can't seem to get this working. Any ideas? -- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/activewarehouse-discuss/attachments/20071127/a1efcd47/attachment-0001.html From bdimchef at wieldim.com Tue Nov 27 15:35:31 2007 From: bdimchef at wieldim.com (Brandon Dimcheff) Date: Tue, 27 Nov 2007 15:35:31 -0500 Subject: [Activewarehouse-discuss] Rails 2.0 In-Reply-To: <7082474f0711271144q579265abtfc06e2ea4cba7a23@mail.gmail.com> References: <7082474f0711271144q579265abtfc06e2ea4cba7a23@mail.gmail.com> Message-ID: <7AE5927C-3495-498D-8267-0E15EAD756AB@wieldim.com> I've had similar problems. I think the etl library is using rails from gems while your models are using vendor/rails. I ended up not using the etl from within edge rails and just redefining my models in my etl file. Super hack job. If you figure out how to fix it properly, please share. - Brandon On Nov 27, 2007, at 14:44, Blake Mizerany wrote: > Hi everyone, > I'm currently working with the AW etl with Rails 2.0 rc1 frozen to > vendor/rails. My etl scripts are: > > blake:~/Sites/metrics/etl blake$ find . > . > ./database.yml > ./log_parser.rb > ./update_logs.ctl > ./updates_apache_log_parser.rb > > when I run: > > etl update_logs.ctl > > I get: > > blake:~/Sites/metrics/etl blake$ etl update_logs.ctl > Using AdapterExtensions > Starting ETL process > initializing ETL engine > Processing update_logs.ctl > /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/ > active_support/dependencies.rb:263:in > `load_missing_constant': uninitialized constant > ActionView::Helpers::BasicObject (NameError) > from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/ > lib/active_support/dependencies.rb:452:in > `const_missing' > from > /Users/blake/Sites/metrics/vendor/rails/actionpack/lib/action_view/ > helpers/prototype_helper.rb:816 > from > /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original_require' > from > /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in > `require' > from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/ > lib/active_support/dependencies.rb:495:in > `require' > from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/ > lib/active_support/dependencies.rb:342:in > `new_constants_in' > from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/ > lib/active_support/dependencies.rb:495:in > `require' > from > /Users/blake/Sites/metrics/vendor/rails/actionpack/lib/action_view/ > helpers/javascript_helper.rb:2 > ... 61 levels... > from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/ > lib/active_support/dependencies.rb:495:in > `require' > from /opt/local/lib/ruby/gems/1.8/gems/activewarehouse- > etl-0.9.0 > /bin/etl:28 > from /opt/local/bin/etl:16:in `load' > from /opt/local/bin/etl:16 > > My ctl files looks like: > > $:.unshift(File.dirname(__FILE__)) > require File.dirname(__FILE__) + '/../config/environment' > > > require File.dirname(__FILE__) + '/updates_apache_log_parser' > > source :in, { > :file => '', > :parser => :updates_apache_log_parser > }, > {} > > destination :out, { > :file => 'updates.txt', > :separator => "\t" > }, > { > :order => [:date_id, :uid] > } > > post_process :bulk_import, { > :file => 'updates.txt', > :truncate => true, > :columns => [:date_id, :uid], > :target => { > :adapter => 'mysql', > :database => 'updates_development', > :table => 'update_facts' > } > } > > > I'm givin 'er all I got and can't seem to get this working. Any > ideas? > > -- > _______________________________________________ > Activewarehouse-discuss mailing list > Activewarehouse-discuss at rubyforge.org > http://rubyforge.org/mailman/listinfo/activewarehouse-discuss