GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — google-cloud-go/bigquery at main · codeincanada/google-cloud-go

Expand file tree

/

bigquery

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
 
 
/

bigquery

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
aliasshim
aliasshim
 
 
analyticshub/apiv1
analyticshub/apiv1
 
 
benchmarks
benchmarks
 
 
connection
connection
 
 
dataexchange/apiv1beta1
dataexchange/apiv1beta1
 
 
datapolicies
datapolicies
 
 
datatransfer/apiv1
datatransfer/apiv1
 
 
internal
internal
 
 
migration
migration
 
 
reservation/apiv1
reservation/apiv1
 
 
storage
storage
 
 
CHANGES.md
CHANGES.md
 
 
README.md
README.md
 
 
arrow.go
arrow.go
 
 
bigquery.go
bigquery.go
 
 
bigquery.replay
bigquery.replay
 
 
bigquery_test.go
bigquery_test.go
 
 
copy.go
copy.go
 
 
copy_test.go
copy_test.go
 
 
dataset.go
dataset.go
 
 
dataset_integration_test.go
dataset_integration_test.go
 
 
dataset_test.go
dataset_test.go
 
 
doc.go
doc.go
 
 
error.go
error.go
 
 
error_test.go
error_test.go
 
 
examples_test.go
examples_test.go
 
 
external.go
external.go
 
 
external_test.go
external_test.go
 
 
extract.go
extract.go
 
 
extract_test.go
extract_test.go
 
 
file.go
file.go
 
 
file_test.go
file_test.go
 
 
gcs.go
gcs.go
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 
iam.go
iam.go
 
 
iam_test.go
iam_test.go
 
 
inserter.go
inserter.go
 
 
inserter_test.go
inserter_test.go
 
 
integration_test.go
integration_test.go
 
 
intervalvalue.go
intervalvalue.go
 
 
intervalvalue_test.go
intervalvalue_test.go
 
 
iterator.go
iterator.go
 
 
iterator_test.go
iterator_test.go
 
 
job.go
job.go
 
 
job_test.go
job_test.go
 
 
load.go
load.go
 
 
load_test.go
load_test.go
 
 
model.go
model.go
 
 
model_test.go
model_test.go
 
 
nulls.go
nulls.go
 
 
nulls_test.go
nulls_test.go
 
 
oc_test.go
oc_test.go
 
 
params.go
params.go
 
 
params_test.go
params_test.go
 
 
query.go
query.go
 
 
query_test.go
query_test.go
 
 
random.go
random.go
 
 
read_test.go
read_test.go
 
 
routine.go
routine.go
 
 
routine_integration_test.go
routine_integration_test.go
 
 
routine_test.go
routine_test.go
 
 
schema.go
schema.go
 
 
schema_test.go
schema_test.go
 
 
standardsql.go
standardsql.go
 
 
standardsql_test.go
standardsql_test.go
 
 
storage_bench_test.go
storage_bench_test.go
 
 
storage_client.go
storage_client.go
 
 
storage_integration_test.go
storage_integration_test.go
 
 
storage_iterator.go
storage_iterator.go
 
 
storage_iterator_test.go
storage_iterator_test.go
 
 
table.go
table.go
 
 
table_integration_test.go
table_integration_test.go
 
 
table_test.go
table_test.go
 
 
trace_integration_test.go
trace_integration_test.go
 
 
value.go
value.go
 
 
value_test.go
value_test.go
 
 

README.md

Outline

BigQuery Go Reference

  • About BigQuery
  • API documentation
  • Go client documentation
  • Complete sample programs

Example Usage

First create a bigquery.Client to use throughout your application: [snip]:# (bq-1)

c, err := bigquery.NewClient(ctx, "my-project-ID")
if err != nil {
	// TODO: Handle error.
}

Then use that client to interact with the API: [snip]:# (bq-2)

// Construct a query.
q := c.Query(`
    SELECT year, SUM(number)
    FROM [bigquery-public-data:usa_names.usa_1910_2013]
    WHERE name = "William"
    GROUP BY year
    ORDER BY year
`)
// Execute the query.
it, err := q.Read(ctx)
if err != nil {
	// TODO: Handle error.
}
// Iterate through the results.
for {
	var values []bigquery.Value
	err := it.Next(&values)
	if err == iterator.Done {  // from "google.golang.org/api/iterator"
		break
	}
	if err != nil {
		// TODO: Handle error.
	}
	fmt.Println(values)
}
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.