Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Invalid value at 'start_index' (TYPE_UINT64), "1e+05" [invalid] issue while downloading data to R from BigQuery

I successfully connected Google BigQuery with the R environment using the bigrquery package.

I have defined a sql statement which extracts a report. While using the bq_table_download function, I get the following error.

Invalid value at 'start_index' (TYPE_UINT64), "1e+05" [invalid]

Code:

sql <- "SELECT * FROM ABC"

df <- bq_project_query(billing, sql)

data <- (bq_table_download(df))

There is very little help on this issue. Thank you in advance.

like image 357
marine8115 Avatar asked Aug 09 '20 15:08

marine8115


2 Answers

The issue is caused as BigQuery allows only 100k records to be downloaded. Adding the options(scipen = 20) script to the start of your code will solve the issue.

like image 64
marine8115 Avatar answered Nov 19 '22 18:11

marine8115


This was just fixed in PR#400 by @gjuggler

updating the bigrquery package to the latest version will fix your issue.

remotes::install_github("r-dbi/bigrquery")
like image 1
Ricardo Saporta Avatar answered Nov 19 '22 18:11

Ricardo Saporta