Skip to content

Instantly share code, notes, and snippets.

@kzk
Created May 3, 2012 01:05
Show Gist options
  • Select an option

  • Save kzk/2582315 to your computer and use it in GitHub Desktop.

Select an option

Save kzk/2582315 to your computer and use it in GitHub Desktop.
td-synchronous-job-issue.rb
require 'td'
require 'td-client'
cln = TreasureData::Client.new(ENV['TREASURE_DATA_API_KEY'])
job = cln.query('testdb', 'SELECT COUNT(1) FROM www_access')
until job.finished?
sleep 2
job.update_status!
end
if job.success?
job.result_each { |row|
p row
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment