I am using the following GoLang package: https://godoc.org/cloud.google.com/go/bigquery
My app runs in Google App Engine
If I have understood the documentation correctly it should be possible to extract the result of a job/query to Google Cloud Storage using a job. I don't think the documentation is very clear and was wondering if anyone has an example code or other help.
TL:DR
How do I get access to the temporary table when using Go Lang instead of command line.
How do I extract the result of my Bigquery to GCS
** EDIT **
Solution i used
I created a temporary table and set it as the Dst (Destination) for the Query result and created an export job with it.
dataset_result.Table(table_name).Create(ctx, bigquery.TableExpiration(time.Now().Add(1*time.Hour)))
Update 2018:
https://github.com/GoogleCloudPlatform/google-cloud-go/issues/547
To get the table name:
q := client.Query(...)
job, err := q.Run(ctx)
// handle err
config, err := job.Config()
// handle err
tempTable := config.(*QueryConfig).Dst