marine8115
marine8115

Reputation: 598

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.

Upvotes: 5

Views: 1490

Answers (2)

Ricardo Saporta
Ricardo Saporta

Reputation: 55360

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")

Upvotes: 1

marine8115
marine8115

Reputation: 598

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.

Upvotes: 8

Related Questions