Documentation ¶
Overview ¶
Package mbigquery implements connecting to Google's BigQuery service and simplifying a number of interactions with it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BigQuery ¶
BigQuery is a wrapper around a bigquery client providing more functionality.
func WithBigQuery ¶
WithBigQuery returns a BigQuery instance which will be initialized and configured when the start event is triggered on the returned (see mrun.Start). The BigQuery instance will have Close called on it when the stop event is triggered on the returned Context (see mrun.Stop).
gce is optional and can be passed in if there's an existing gce object which should be used, otherwise a new one will be created with mdb.MGCE.
func (*BigQuery) Table ¶
func (bq *BigQuery) Table( ctx context.Context, dataset, tableName string, schemaObj interface{}, ) ( *bigquery.Table, *bigquery.Uploader, error, )
Table initializes and returns the table instance with the given dataset and schema information. This method caches the Table/Uploader instances it returns, so multiple calls with the same dataset/tableName will only actually create those instances on the first call.
type Time ¶
Time wraps a time.Time object and provides marshaling/unmarshaling for bigquery's time format.
func (*Time) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface.
func (Time) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface.
func (*Time) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
func (*Time) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface.