5

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.

marine8115
  • 588
  • 3
  • 22
  • Could you please let me know, how I can provide a reproducible example in this case? Give you access to the data warehouse ? This is a general error that may be encountered for any GBQ project. – marine8115 Aug 10 '20 at 12:16

2 Answers2

8

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.

marine8115
  • 588
  • 3
  • 22
1

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")
Ricardo Saporta
  • 54,400
  • 17
  • 144
  • 178