here is basically my creation script for bigquery in golang :
type data_pix struct {
Id string
IdC string
Stamp int64
Tag []string
}
func createTable(client *bigquery.Client, datasetID, tableID string) error {
ctx := context.Background()
// [START bigquery_create_table]
schema, err := bigquery.InferSchema(data_pix{})
if err != nil {
return err
}
table := client.Dataset(datasetID).Table(tableID)
if err := table.Create(ctx, schema); err != nil {
return err
}
// [END bigquery_create_table]
return nil
}
for the moment i use mainly a timestamp in Int64.
But i am looking for any example on how to add Datetime to my struct and btw add Datetime to my data
Thanks and regards