lib/embulk/input/presto.rb in embulk-input-presto-0.1.0 vs lib/embulk/input/presto.rb in embulk-input-presto-0.1.1

- old
+ new

@@ -35,21 +35,25 @@ catalog: task['catalog'], user: task['user'], schema: task['schema'] ) @query = task["query"] + + Embulk.logger.info "SQL: #{@query}" end def run + size = 0 @client.query(@query) do |q| q.each_row {|row| page_builder.add(row) } + size = q.rows.size end page_builder.finish - task_report = {} + task_report = { size: size } return task_report end end end