Database Reference
In-Depth Information
preserve information about the original table and allow you to manipulate,
plot, or further analyze the local copy of the data. They do, however, eagerly
download all of the data, which can be slow. A future enhancement to
bigrquery may allow you to access data lazily, so you can leave as much of
the data as possible in the cloud and download it only when you need it.
Installing Bigrquery
Bigrquery is a standard R extension that lives in CRAN—the central R
extension repository. Like any CRAN package, you can install it directly
from the R command line by running:
> install.packages("bigrquery", dependencies=TRUE)
Adding the dependencies=TRUE argument should ensure that the
transitive dependencies are installed as well. The Rook package is also
needed to perform authentication; the rjson package is needed to parse
JSON responses coming from BigQuery. These commands will get you the
latest bigrquery version from CRAN. To install the latest version released by
the tool author, you can install it using devtools :
> install.packages("devtools", dependencies=TRUE)
> devtools::install_github("assertthat")
> devtools::install_github("bigrquery")
After bigrquery is installed, you will need to perform authentication.
Authentication is triggered the first time you try to run a query; in this case,
just run a dummy query to force authentication to occur.
> library(bigrquery)
> billing_project <- "bigquery-e2e"
> query_exec("publicdata", "samples", "SELECT 17" ,
billing=billing_project)
starting httpd help server … done
Waiting for authentication in browser…
This pops up a browser window that prompts you to log in (if you're not
already logged in) and asks you if you want to allow access to your BigQuery
Data. Press Allow. Then it displays a page that says Authentication Complete
Search WWH ::




Custom Search