Add control over digits and jsonlite options in uploading data#664
Add control over digits and jsonlite options in uploading data#664hadley merged 14 commits intor-dbi:mainfrom
Conversation
|
I've refocussed this on just data, since I think it's unlikely to affect fields (and if params really are necessary, we should tackle in a different way). Does this still solve your motivating problem? |
|
This is producing an error: bigrquery::bq_table_upload(ds, data.frame(p=pi), json_digits=NA)
# Error in parent.frame(n + 1) :
# promise already under evaluation: recursive default argument reference or earlier problems?Debugging it shows it is happening in bigrquery:::check_digits(2)
# [1] 2
bigrquery:::check_digits(NULL)
# [1] 22
bigrquery:::check_digits(NA)
# Error in parent.frame(n + 1) :
# promise already under evaluation: recursive default argument reference or earlier problems?I think it's because the formal is |
|
Sorry, the default is now |
|
Yes, I probably introduced that in my other PR :-( |
|
Just wanted to see if you've had a chance to look at this yet? I'd love to get a bigrquery release out soon. |
Yes, I think it's ready afaict. Thanks @hadley ! |
Two methods to control digits in uploaded data:
options(bigrquery.jsonlite.toJSON=list(digits=NA))passes that arg (and any others in the named list) tojsonlite::stream_outand::toJSON; andoptions(bigrquery.digits=22), a simpler way to pass only digits to the same functions.Includes
NEWS, code, and unit-tests.