
Pull a BigQuery table (or filtered slice) as a data.frame.
Source: R/datasets.R
morie_datasets_bigquery.RdRequires the bigrquery package and Application Default Credentials.
Usage
morie_datasets_bigquery(
project,
dataset,
table,
where = NULL,
limit = NULL,
select = "*",
billing_project = NULL
)Arguments
- project
Source project (e.g.
"bigquery-public-data").- dataset
Source dataset (e.g.
"chicago_crime").- table
Source table (e.g.
"crime").- where
Raw SQL WHERE clause (without leading
WHERE).- limit
Optional integer
LIMIT.- select
Projection list; defaults to
"*".- billing_project
GCP project to bill;
NULLuses ADC-discovered.
Examples
if (FALSE) { # nzchar(Sys.getenv("GCP_PROJECT")) && requireNamespace("bigrquery", quietly = TRUE)
# Runs when the caller has bigrquery + a GCP_PROJECT billing project.
# Keyless alternatives: the bundled samples in 'rmoriedata' and the
# morie_datasets_*() open-data fetchers (Socrata / CKAN, no account).
df <- morie_datasets_bigquery("bigquery-public-data", "chicago_crime",
"crime", limit = 10L)
}