S3 classes that reference remote BigQuery datasets, tables and jobs
Create references to BigQuery datasets, jobs, and tables. Each class
has a constructor function (bq_dataset()
, bq_table()
, bq_job()
)
and a coercion function (as_bq_dataset()
, as_bq_table()
, as_bq_job()
).
The coercions functions come with methods for strings (which find components
by splitting on .
), and lists (which look for named components like
projectId
or project_id
).
All bq_table_
, bq_dataset_
and bq_job_
functions call the appropriate
coercion functions on their first argument, allowing you to flexible specify
their inputs.
bq_dataset(project, dataset) as_bq_dataset(x) bq_table(project, dataset, table = NULL) as_bq_table(x, ...) bq_job(project, job, location = "US") as_bq_job(x)
project, dataset, table, job |
Individual project, dataset, table, and job identifiers (strings). For |
x |
An object to coerce to a |
... |
Other arguments passed on to methods. |
location |
Job location |
api-job, api-perform, api-dataset, and api-table for functions that work with these objects.
# Creation ------------------------------------------------ samples <- bq_dataset("publicdata", "samples") natality <- bq_table("publicdata", "samples", "natality") natality # Or bq_table(samples, "natality") bq_job("bigrquery-examples", "m0SgFu2ycbbge6jgcvzvflBJ_Wft") # Coercion ------------------------------------------------ as_bq_dataset("publicdata.shakespeare") as_bq_table("publicdata.samples.natality") as_bq_table(list( project_id = "publicdata", dataset_id = "samples", table_id = "natality" )) as_bq_job(list( projectId = "bigrquery-examples", jobId = "job_m0SgFu2ycbbge6jgcvzvflBJ_Wft", location = "US" ))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.