No commit activity in last 3 years
No release in over 3 years
Google BigQuery API client library. This is simple wrapper.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.6
~> 0

Runtime

 Project Readme

BigQuery

Gitter

Google BigQuery API client library

Installation

Add this line to your application's Gemfile:

gem 'yancya-big_query'

And then execute:

$ bundle

Or install it yourself as:

$ gem install yancya-big_query

Usage

bq = Yancya::BigQuery.new(
  key_path: "path_to_secret_key"
  issuer: "mail@address"
)

job = bq.jobs.query(
  project_id: "name_of_project",
  sql: "select 1 as a, 2 as b, 3 as c"
)

begin
  result = job.query_results
end until result["jobComplete"]

result["schema"]["fields"].map{|f| f["name"]}.join(",") #=> "a,b,c"
result["rows"].map{|row| row["f"].map{|col| col["v"]}.join(",")} #=> ["1,2,3"]

Google BigQuery API Reference

https://developers.google.com/bigquery/docs/reference/v2/

Contributing

  1. Fork it ( https://github.com/yancya/big_query/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request