Bigrquery - no errors

81 views Asked by At

I've been working with R and the library Bigrquery for a year. But since a few months, I'm not receiving any errors or warnings anymore from the function bq_perform_upload().

For exemple, when a data.frame column is numeric, while the bigquery table expects it to be a string, I used to receive a warning/error indicating that the type didn't match. Now I receive the bq_job, as if the upload has passed.

Anyone knows how to turn this back on?

getOption(x = "warn") => 0
getOption(x = "show.error.messages") => TRUE
1

There are 1 answers

0
IRTFM On

This is a guess in the sense that it is untested but I suspect it may hold the key. I installed the bigrquery package but also stored the current state of the options list in a separate variable before loading the package. (I didn't know how to recover options by package "membership".) The I built a logical vector that indicated whether an option was new and use that to get their names:

cur.opt <- options()
library(bigrquery)

new.opt <- !names(options()) %in% names(cur.opt)
new.opt
  [1] FALSE FALSE FALSE FALSE  TRUE  TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
 [16] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
 [31] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
 [46] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
 [61] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
 [76] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
 [91] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[106] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[121] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[136] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE

options()[new.opt]
#--------
$bigrquery.page.size
[1] 10000

$bigrquery.quiet
[1] NA.

So my guess is that you need to set the option "bigrquery.quiet" to FALSE rather than NA. With a bit of difficulty I found the help page where this option is documented:

?`bigrquery-package`

This is only documented to affect the display of a progress bar, so I could be off base here. Usually package authors will put a link to their overall package help page in their Index listing but not Hadley, apparently.