Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to work/download with NUMERIC columns #282

Closed
Iuiu1234 opened this issue Jan 7, 2019 · 2 comments

Comments

@Iuiu1234
Copy link

commented Jan 7, 2019

Bigrquery don't know how to work with NUMERIC columns.

ERROR
Next code
conbq <- DBI::dbConnect(bigrquery::bigquery(), dataset = bqdataset, project = bqproject , billing = bqproject, use_legacy_sql = FALSE)
sql = "select cast(2 as NUMERIC) numeric_column"
dbGetQuery(conbq,sql)

gives the error
Error in bq_parse_files(schema_path, page_paths, n = page_info$n_rows, : Unknown type NUMERIC

SOLUTION
In the file 'srt/BqField.cpp' line 48, adding the code
} else if (x == "NUMERIC") { return BQ_FLOAT;
solves the problem.

paulsendavidjay added a commit to paulsendavidjay/bigrquery that referenced this issue Jan 23, 2019

update NEWS.md with r-dbi#282, r-dbi#286
added description to NEWS.md

paulsendavidjay added a commit to paulsendavidjay/bigrquery that referenced this issue Jan 23, 2019

@hadley hadley closed this in c1f772e Jan 23, 2019

@SurinSpace

This comment has been minimized.

Copy link

commented Mar 4, 2019

Numeric columns are still causing me to have an Error:
Error in is_fun_list(.x) : object 'as.float' not found

image

@saabeilin

This comment has been minimized.

Copy link

commented Mar 29, 2019

I'm facing probably the same/similar issu:

> res <- bigrquery::query_exec(sql, project=project, use_legacy_sql = FALSE)
200.0 megabytes processed
Error: Don't know how to convert type numeric

Notice the lowercase numeric.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.