bigrquery icon indicating copy to clipboard operation
bigrquery copied to clipboard

Data Type: BIGNUMERIC support

Open eduardodrc opened this issue 3 years ago • 7 comments

There is a new decimal type BIGNUMERIC available for Big Query tables (see data types docs). When we load a table with this type, we receive the error message:

Running job 'example' [\]  1s
Complete
Billed: XX.XX MB
Downloading Y rows in Z pages.
Error in bq_parse_files(schema_path, page_paths, n = page_info$n_rows,  :                              
  Unknown type BIGNUMERIC

I think that we can just map BIGNUMERIC to float type (Rcpp::DoubleVector), but I'm not a master here. A similar request in the python SDK can help python-bigquery/ issue 367.

Thank you for the great work!

eduardodrc avatar Mar 01 '21 18:03 eduardodrc

Any update on this issue?

dylanrussellmd avatar May 04 '21 19:05 dylanrussellmd

@dylanrussellmd if there were any updates, rest assured that they would appear here.

hadley avatar May 04 '21 20:05 hadley

any suggested workarounds for now, other than asking my database maintainer to change the data type?

kieran-mace avatar Aug 09 '21 23:08 kieran-mace

Would be nice to see some updates soon... ;)

thomassie avatar Dec 15 '21 16:12 thomassie

@kieran-mace you could just cast to a supported type in your query

hadley avatar Dec 15 '21 18:12 hadley

That's actually the point here: you don't want to get into the process of changing the data type in a query/view, which is not that easily editable due to security measures. (Otherwise, I guess, this wouldn't be an issue here.)

thomassie avatar Apr 15 '22 09:04 thomassie

@thomassie I understand it's a work around, but you can always do it, so it should unblock any specific problems.

hadley avatar Apr 15 '22 12:04 hadley

I'd very much appreciate it if anyone could make me a reprex for this issue, i.e. some code that created a table with a BIGNUMERIC field and then tried to download from it. That would save me a little time and allow me to fix the underlying problem a little bit faster.

hadley avatar Nov 03 '23 13:11 hadley

I think the easiest thing to do (which I'll do for all unknown types) is to just return the string data, so you can do what you will with it.

hadley avatar Nov 09 '23 22:11 hadley