bigquery: schema field of type NUMERIC is not assignable to struct field #6492
Labels
api: bigquery
Issues related to the BigQuery API.
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: docs
Improvement to the documentation for an API.
Client
BigQuery
Environment
golang:1.18
Go Environment
go version go1.18.5 darwin/amd64
Code
Expected behavior
BigQuery row loaded into struct.
Actual behavior
Notes
I have a record
struct
in Go which attempts to match the corresponding BigQuery schema. However, I haven't found any documentation on how certain BigQuery types should be matched to Go's types.For this particular example, nullable
NUMERIC
, I've tried using:float64
,bigquery.NullFloat64
and I've even tried usingnull.Float
from gopkg.in/guregu/null.v4 which I used for Postgres databases.It would be nice if there were documentation somewhere which illustrated the BiqQuery data types to Go data types. For my particular table, I have other BigQuery data types I need to support besides nullable
NUMERIC
, nullableBIGNUMERIC
, nullableBOOLEAN
, nullableDATE
, nullableTIMESTAMP
, etc...The text was updated successfully, but these errors were encountered: