activewarehouse / activewarehouse-etl

Extract-Transform-Load library from ActiveWarehouse

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adding limit to PostgreSQL query broken

kennym opened this issue · comments

When specifying a limit argument (bundle exec etl etl/run_all.ebf --limit 5) with a value against a PostgreSQL source database, I am retrieving the following error:

activewarehouse-etl-1.0.0.rc1/lib/etl/control/source/database_source.rb:197:in `query': undefined method `add_limit_offset!' for #<ActiveRecord::ConnectionAdapters::PostgreSQLAdapter:0x007fe9cf329248> (NoMethodError)

I haven't tried it on other databases sources.

The add_limit_offset method is seemingly deprecated for some time already in newer Rails versions: http://apidock.com/rails/ActiveRecord/ConnectionAdapters/DB2Adapter/add_limit_offset!

Good catch! Let me know if you come up with a patch (or I'll dive later on).

This fixes the issue with PostgreSQL at least. I can add tests tonight (in about 6 hours from now) if needed.

Thanks! Tests are most welcome too; but let me know if you're stuck with how to run them etc!

Pull request sent! :)

Thanks!

Envoyé de mon iPhone

Le 24 avr. 2012 à 18:01, Kenny Meyer
reply@reply.github.com
a écrit :

Pull request sent! :)


Reply to this email directly or view it on GitHub:
#92 (comment)