bqexport

command
v0.0.0-...-e560ebb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause Imports: 17 Imported by: 0

README

bqexport is a go:generate utility to generate Go structs based on BigQuery schema protobufs compatible with bqschemaupdater. These structs can then be used in combination with eventupload to send events to BigQuery.

Usage

  1. Create a TableDef protobuf.
  2. Once your protobuf has been reviewed and committed, run the bqexport command: bqexport --help. Don't have bqexport in your path? Try this inside the infra Go env.
  3. Add a go:generate line in generate.go in your Go package alongside your generated file:
//go:generate go install infra/cmd/bqexport
//go:generate bqexport -name MyStruct -path /path/to/tabledef.pb.txt

Documentation

Overview

bqexport loads a BigQuery struct definition from Go source and exports a table definition protobuf suitable for "bqschemaupdater" to instantiate and process.

https://github.com/GoogleCloudPlatform/google-cloud-go/issues/726

The "d=" tag instructs "bqexport" to read the remainder of the tag as a field description.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL