Archive for September, 2013

Gist: Google BigQuery results reformat

September 25th, 2013

Working with Google BigQuery (a database system for massive datasets, massive being billions of rows) and using Google API Client in Ruby, we noticed the responses come in a non named keys (columns) JSON format.
This new_row_format(field, rows) method solves that, rebuilding the array of hashes with named keys:

(blogged from Vim)