Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

bqr_query

Query a BigQuery Table


Description

MaxResults is how many results to return per page of results, which can be less than the total results you have set in your query using LIMIT. Google recommends for bigger datasets to set maxResults = 1000, but this will use more API calls.

Usage

bqr_query(projectId = bqr_get_global_project(),
  datasetId = bqr_get_global_dataset(), query, maxResults = 1000,
  useLegacySql = TRUE, useQueryCache = TRUE)

Arguments

projectId

The BigQuery project ID

datasetId

A datasetId within projectId

query

BigQuery SQL. You can also supply a file location of your query ending with .sql

maxResults

Max number per page of results. Set total rows with LIMIT in your query.

useLegacySql

Whether the query you pass is legacy SQL or not. Default TRUE

useQueryCache

Whether to use the query cache. Default TRUE, set to FALSE for realtime queries.

Value

a data.frame. If there is an SQL error, a data.frame with additional class "bigQueryR_query_error" and the problem in the data.frame$message

See Also

Examples

## Not run: 

bqr_query("big-query-r","samples",
          "SELECT COUNT(repository.url) FROM [publicdata:samples.github_nested]")


## End(Not run)

bigQueryR

Interface with Google BigQuery with Shiny Compatibility

v0.5.0
MIT + file LICENSE
Authors
Mark Edmondson [aut, cre], Hadley Wickham [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.