From 34a4b631c0460dbbe450ad0beca8620c2d477593 Mon Sep 17 00:00:00 2001 From: Eszter Kocsis Date: Mon, 26 Apr 2021 13:26:13 +0200 Subject: [PATCH 1/2] update roxygen bqr_query docs --- DESCRIPTION | 2 +- man/bqr_query.Rd | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 0317a5a..454d847 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -28,5 +28,5 @@ Suggests: testthat, data.table, purrr -RoxygenNote: 7.0.2 +RoxygenNote: 7.1.1 VignetteBuilder: knitr diff --git a/man/bqr_query.Rd b/man/bqr_query.Rd index 3e998c5..13198e3 100644 --- a/man/bqr_query.Rd +++ b/man/bqr_query.Rd @@ -10,7 +10,9 @@ bqr_query( query, maxResults = 1000, useLegacySql = TRUE, - useQueryCache = TRUE + useQueryCache = TRUE, + dryRun = FALSE, + timeoutMs = 600 * 1000 ) } \arguments{ From cab482753b17aa6de6ccb151550c0c3a02f71fb8 Mon Sep 17 00:00:00 2001 From: Eszter Kocsis Date: Mon, 26 Apr 2021 13:27:11 +0200 Subject: [PATCH 2/2] fix bqr_get_job example --- R/downloadData.R | 8 ++++---- R/jobs.R | 6 +++--- R/query.R | 6 +++--- man/bqr_extract_data.Rd | 4 ++-- man/bqr_get_job.Rd | 4 ++-- man/bqr_grant_extract_access.Rd | 4 ++-- man/bqr_query_asynch.Rd | 4 ++-- vignettes/bigQueryR.Rmd | 4 ++-- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/R/downloadData.R b/R/downloadData.R index ef32974..cda6ed7 100644 --- a/R/downloadData.R +++ b/R/downloadData.R @@ -32,7 +32,7 @@ #' #' ## poll the job to check its status #' ## its done when job$status$state == "DONE" -#' bqr_get_job("your_project", job) +#' bqr_get_job(job$jobReference$jobId, "your_project") #' #' ##once done, the query results are in "bigResultTable" #' ## extract that table to GoogleCloudStorage: @@ -46,7 +46,7 @@ #' #' ## poll the extract job to check its status #' ## its done when job$status$state == "DONE" -#' bqr_get_job("your_project", job_extract$jobReference$jobId) +#' bqr_get_job(job_extract$jobReference$jobId, "your_project") #' #' You should also see the extract in the Google Cloud Storage bucket #' googleCloudStorageR::gcs_list_objects("your_cloud_storage_bucket_name") @@ -234,7 +234,7 @@ bqr_download_extract <- function(extractJob, #' #' ## poll the job to check its status #' ## its done when job$status$state == "DONE" -#' bqr_get_job("your_project", job$jobReference$jobId) +#' bqr_get_job(job$jobReference$jobId, "your_project") #' #' ##once done, the query results are in "bigResultTable" #' ## extract that table to GoogleCloudStorage: @@ -248,7 +248,7 @@ bqr_download_extract <- function(extractJob, #' #' ## poll the extract job to check its status #' ## its done when job$status$state == "DONE" -#' bqr_get_job("your_project", job_extract$jobReference$jobId) +#' bqr_get_job(job_extract$jobReference$jobId, "your_project") #' #' ## to download via a URL and not logging in via Google Cloud Storage interface: #' ## Use an email that is Google account enabled diff --git a/R/jobs.R b/R/jobs.R index 0417c83..6ef4251 100644 --- a/R/jobs.R +++ b/R/jobs.R @@ -100,7 +100,7 @@ bqr_wait_for_job <- function(job, wait=5){ #' #' ## poll the job to check its status #' ## its done when job$status$state == "DONE" -#' bqr_get_job("your_project", job$jobReference$jobId) +#' bqr_get_job(job$jobReference$jobId, "your_project") #' #' ##once done, the query results are in "bigResultTable" #' ## extract that table to GoogleCloudStorage: @@ -114,7 +114,7 @@ bqr_wait_for_job <- function(job, wait=5){ #' #' ## poll the extract job to check its status #' ## its done when job$status$state == "DONE" -#' bqr_get_job("your_project", job_extract$jobReference$jobId) +#' bqr_get_job(job_extract$jobReference$jobId, "your_project") #' #' ## to download via a URL and not logging in via Google Cloud Storage interface: #' ## Use an email that is Google account enabled @@ -207,4 +207,4 @@ bqr_list_jobs <- function(projectId = bqr_get_global_project(), lapply(out$jobs, as.job) -} \ No newline at end of file +} diff --git a/R/query.R b/R/query.R index 394cbbb..75ab6f2 100644 --- a/R/query.R +++ b/R/query.R @@ -167,7 +167,7 @@ bqr_query <- function(projectId = bqr_get_global_project(), #' #' ## poll the job to check its status #' ## its done when job$status$state == "DONE" -#' bqr_get_job("your_project", job$jobReference$jobId) +#' bqr_get_job(job$jobReference$jobId, "your_project") #' #' ##once done, the query results are in "bigResultTable" #' ## extract that table to GoogleCloudStorage: @@ -181,7 +181,7 @@ bqr_query <- function(projectId = bqr_get_global_project(), #' #' ## poll the extract job to check its status #' ## its done when job$status$state == "DONE" -#' bqr_get_job("your_project", job_extract$jobReference$jobId) +#' bqr_get_job(job_extract$jobReference$jobId, "your_project") #' #' ## to download via a URL and not logging in via Google Cloud Storage interface: #' ## Use an email that is Google account enabled @@ -258,4 +258,4 @@ bqr_query_asynch <- function(projectId = bqr_get_global_project(), as.job(out) -} \ No newline at end of file +} diff --git a/man/bqr_extract_data.Rd b/man/bqr_extract_data.Rd index 70b7602..322d55b 100644 --- a/man/bqr_extract_data.Rd +++ b/man/bqr_extract_data.Rd @@ -58,7 +58,7 @@ job <- bqr_query_asynch("your_project", ## poll the job to check its status ## its done when job$status$state == "DONE" -bqr_get_job("your_project", job) +bqr_get_job(job$jobReference$jobId, "your_project") ##once done, the query results are in "bigResultTable" ## extract that table to GoogleCloudStorage: @@ -72,7 +72,7 @@ job_extract <- bqr_extract_data("your_project", ## poll the extract job to check its status ## its done when job$status$state == "DONE" -bqr_get_job("your_project", job_extract$jobReference$jobId) +bqr_get_job(job_extract$jobReference$jobId, "your_project") You should also see the extract in the Google Cloud Storage bucket googleCloudStorageR::gcs_list_objects("your_cloud_storage_bucket_name") diff --git a/man/bqr_get_job.Rd b/man/bqr_get_job.Rd index 8ba5ba1..b705114 100644 --- a/man/bqr_get_job.Rd +++ b/man/bqr_get_job.Rd @@ -33,7 +33,7 @@ job <- bqr_query_asynch("your_project", ## poll the job to check its status ## its done when job$status$state == "DONE" -bqr_get_job("your_project", job$jobReference$jobId) +bqr_get_job(job$jobReference$jobId, "your_project") ##once done, the query results are in "bigResultTable" ## extract that table to GoogleCloudStorage: @@ -47,7 +47,7 @@ job_extract <- bqr_extract_data("your_project", ## poll the extract job to check its status ## its done when job$status$state == "DONE" -bqr_get_job("your_project", job_extract$jobReference$jobId) +bqr_get_job(job_extract$jobReference$jobId, "your_project") ## to download via a URL and not logging in via Google Cloud Storage interface: ## Use an email that is Google account enabled diff --git a/man/bqr_grant_extract_access.Rd b/man/bqr_grant_extract_access.Rd index addb8e7..d099ab1 100644 --- a/man/bqr_grant_extract_access.Rd +++ b/man/bqr_grant_extract_access.Rd @@ -37,7 +37,7 @@ job <- bqr_query_asynch("your_project", ## poll the job to check its status ## its done when job$status$state == "DONE" -bqr_get_job("your_project", job$jobReference$jobId) +bqr_get_job(job$jobReference$jobId, "your_project") ##once done, the query results are in "bigResultTable" ## extract that table to GoogleCloudStorage: @@ -51,7 +51,7 @@ job_extract <- bqr_extract_data("your_project", ## poll the extract job to check its status ## its done when job$status$state == "DONE" -bqr_get_job("your_project", job_extract$jobReference$jobId) +bqr_get_job(job_extract$jobReference$jobId, "your_project") ## to download via a URL and not logging in via Google Cloud Storage interface: ## Use an email that is Google account enabled diff --git a/man/bqr_query_asynch.Rd b/man/bqr_query_asynch.Rd index 0fe3082..03804bf 100644 --- a/man/bqr_query_asynch.Rd +++ b/man/bqr_query_asynch.Rd @@ -66,7 +66,7 @@ job <- bqr_query_asynch("your_project", ## poll the job to check its status ## its done when job$status$state == "DONE" -bqr_get_job("your_project", job$jobReference$jobId) +bqr_get_job(job$jobReference$jobId, "your_project") ##once done, the query results are in "bigResultTable" ## extract that table to GoogleCloudStorage: @@ -80,7 +80,7 @@ job_extract <- bqr_extract_data("your_project", ## poll the extract job to check its status ## its done when job$status$state == "DONE" -bqr_get_job("your_project", job_extract$jobReference$jobId) +bqr_get_job(job_extract$jobReference$jobId, "your_project") ## to download via a URL and not logging in via Google Cloud Storage interface: ## Use an email that is Google account enabled diff --git a/vignettes/bigQueryR.Rmd b/vignettes/bigQueryR.Rmd index 5ce9fba..b7034bb 100644 --- a/vignettes/bigQueryR.Rmd +++ b/vignettes/bigQueryR.Rmd @@ -97,7 +97,7 @@ job <- bqr_query_asynch("your_project", ## poll the job to check its status ## its done when job$status$state == "DONE" -bqr_get_job("your_project", job$jobReference$jobId) +bqr_get_job(job$jobReference$jobId, "your_project") ##once done, the query results are in "bigResultTable" ``` @@ -117,7 +117,7 @@ job_extract <- bqr_extract_data("your_project", ## poll the extract job to check its status ## its done when job$status$state == "DONE" -bqr_get_job("your_project", job_extract$jobReference$jobId) +bqr_get_job(job_extract$jobReference$jobId, "your_project") ## to download via a URL and not logging in via Google Cloud Storage interface: ## Use an email that is Google account enabled