Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 18-Jul-2019 | - | ||||
benchmarks/ | H | 18-Jul-2019 | - | 106 | 75 | |
datatransfer/apiv1/ | H | 18-Jul-2019 | - | 2,477 | 1,838 | |
storage/apiv1beta1/ | H | 18-Jul-2019 | - | 970 | 657 | |
README.md | H A D | 18-Jul-2019 | 1.2 KiB | 47 | 43 | |
bigquery.go | H A D | 18-Jul-2019 | 4.9 KiB | 163 | 107 | |
bigquery.replay | H A D | 18-Jul-2019 | 888.5 KiB | 26,493 | 26,493 | |
copy.go | H A D | 18-Jul-2019 | 3.2 KiB | 108 | 65 | |
copy_test.go | H A D | 18-Jul-2019 | 4 KiB | 164 | 144 | |
dataset.go | H A D | 18-Jul-2019 | 20.8 KiB | 709 | 537 | |
dataset_test.go | H A D | 18-Jul-2019 | 13.5 KiB | 457 | 409 | |
doc.go | H A D | 18-Jul-2019 | 9.6 KiB | 311 | 1 | |
error.go | H A D | 18-Jul-2019 | 2.4 KiB | 84 | 50 | |
error_test.go | H A D | 18-Jul-2019 | 2.6 KiB | 110 | 86 | |
examples_test.go | H A D | 18-Jul-2019 | 20.2 KiB | 830 | 609 | |
external.go | H A D | 18-Jul-2019 | 12.9 KiB | 401 | 238 | |
external_test.go | H A D | 18-Jul-2019 | 3.7 KiB | 144 | 121 | |
extract.go | H A D | 18-Jul-2019 | 3 KiB | 111 | 73 | |
extract_test.go | H A D | 18-Jul-2019 | 2.8 KiB | 117 | 94 | |
file.go | H A D | 18-Jul-2019 | 4.7 KiB | 138 | 73 | |
file_test.go | H A D | 18-Jul-2019 | 2.5 KiB | 99 | 78 | |
gcs.go | H A D | 18-Jul-2019 | 2.7 KiB | 76 | 32 | |
inserter.go | H A D | 18-Jul-2019 | 7.2 KiB | 241 | 156 | |
inserter_test.go | H A D | 18-Jul-2019 | 5.4 KiB | 211 | 185 | |
integration_test.go | H A D | 18-Jul-2019 | 64 KiB | 2,421 | 2,116 | |
iterator.go | H A D | 18-Jul-2019 | 6.7 KiB | 223 | 139 | |
iterator_test.go | H A D | 18-Jul-2019 | 8.9 KiB | 363 | 325 | |
job.go | H A D | 18-Jul-2019 | 25.4 KiB | 835 | 556 | |
job_test.go | H A D | 18-Jul-2019 | 2.4 KiB | 96 | 76 | |
load.go | H A D | 18-Jul-2019 | 5 KiB | 154 | 91 | |
load_test.go | H A D | 18-Jul-2019 | 7.8 KiB | 299 | 272 | |
model.go | H A D | 18-Jul-2019 | 8 KiB | 259 | 158 | |
model_test.go | H A D | 18-Jul-2019 | 3 KiB | 121 | 101 | |
nulls.go | H A D | 18-Jul-2019 | 8.2 KiB | 349 | 252 | |
nulls_test.go | H A D | 18-Jul-2019 | 2.4 KiB | 76 | 54 | |
oc_test.go | H A D | 18-Jul-2019 | 1 KiB | 39 | 18 | |
params.go | H A D | 18-Jul-2019 | 10.6 KiB | 371 | 277 | |
params_test.go | H A D | 18-Jul-2019 | 9.5 KiB | 376 | 332 | |
query.go | H A D | 18-Jul-2019 | 11.6 KiB | 329 | 195 | |
query_test.go | H A D | 18-Jul-2019 | 11.1 KiB | 409 | 373 | |
random.go | H A D | 18-Jul-2019 | 1.5 KiB | 57 | 26 | |
read_test.go | H A D | 18-Jul-2019 | 6.5 KiB | 234 | 194 | |
routine.go | H A D | 18-Jul-2019 | 9.4 KiB | 347 | 263 | |
routine_test.go | H A D | 18-Jul-2019 | 4 KiB | 152 | 131 | |
schema.go | H A D | 18-Jul-2019 | 15.3 KiB | 519 | 341 | |
schema_test.go | H A D | 18-Jul-2019 | 23.8 KiB | 1,045 | 970 | |
standardsql.go | H A D | 18-Jul-2019 | 4.4 KiB | 178 | 131 | |
standardsql_test.go | H A D | 18-Jul-2019 | 2.9 KiB | 132 | 112 | |
table.go | H A D | 18-Jul-2019 | 20.5 KiB | 655 | 430 | |
table_test.go | H A D | 18-Jul-2019 | 10.8 KiB | 391 | 362 | |
value.go | H A D | 18-Jul-2019 | 23.8 KiB | 893 | 710 | |
value_test.go | H A D | 18-Jul-2019 | 32.4 KiB | 1,264 | 1,149 |
README.md
1## BigQuery [![GoDoc](https://godoc.org/cloud.google.com/go/bigquery?status.svg)](https://godoc.org/cloud.google.com/go/bigquery) 2 3- [About BigQuery](https://cloud.google.com/bigquery/) 4- [API documentation](https://cloud.google.com/bigquery/docs) 5- [Go client documentation](https://godoc.org/cloud.google.com/go/bigquery) 6- [Complete sample programs](https://github.com/GoogleCloudPlatform/golang-samples/tree/master/bigquery) 7 8### Example Usage 9 10First create a `bigquery.Client` to use throughout your application: 11[snip]:# (bq-1) 12```go 13c, err := bigquery.NewClient(ctx, "my-project-ID") 14if err != nil { 15 // TODO: Handle error. 16} 17``` 18 19Then use that client to interact with the API: 20[snip]:# (bq-2) 21```go 22// Construct a query. 23q := c.Query(` 24 SELECT year, SUM(number) 25 FROM [bigquery-public-data:usa_names.usa_1910_2013] 26 WHERE name = "William" 27 GROUP BY year 28 ORDER BY year 29`) 30// Execute the query. 31it, err := q.Read(ctx) 32if err != nil { 33 // TODO: Handle error. 34} 35// Iterate through the results. 36for { 37 var values []bigquery.Value 38 err := it.Next(&values) 39 if err == iterator.Done { 40 break 41 } 42 if err != nil { 43 // TODO: Handle error. 44 } 45 fmt.Println(values) 46} 47```