diff --git a/lib/etl/control/source/mysql_streamer.rb b/lib/etl/control/source/mysql_streamer.rb index 5d12160..1150199 100644 --- a/lib/etl/control/source/mysql_streamer.rb +++ b/lib/etl/control/source/mysql_streamer.rb @@ -21,7 +21,7 @@ def initialize(query, target, connection) # in the SQL - its bound to cause trouble @query = query.split.join(' ') @name = target - @first_row = connection.select_all("#{query} LIMIT 1") + @first_row = connection.select_all("#{query.sub(/ LIMIT \d+/, '')} LIMIT 1") end # We implement some bits of a hash so that database_source