Skip to content

Commit 03127d7

Browse files
authored
migrate from go/bqx to go/cloud/bqx (#871)
* migrate from go/bqx to go/cloud/bqx * reorder imports * update bindata
1 parent fa1bca4 commit 03127d7

File tree

18 files changed

+45
-28
lines changed

18 files changed

+45
-28
lines changed

bq/gke_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ import (
99
"cloud.google.com/go/bigquery"
1010
"google.golang.org/api/googleapi"
1111

12+
"github.com/m-lab/go/cloud/bqx"
13+
1214
"github.com/m-lab/etl/bq"
1315
"github.com/m-lab/etl/etl"
1416
"github.com/m-lab/etl/fake"
1517
"github.com/m-lab/etl/row"
16-
"github.com/m-lab/go/bqx"
1718
)
1819

1920
func init() {

bq/insert.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,12 @@ import (
2929
"cloud.google.com/go/bigquery"
3030
"google.golang.org/api/googleapi"
3131

32+
"github.com/m-lab/go/cloud/bqx"
33+
3234
"github.com/m-lab/etl/etl"
3335
"github.com/m-lab/etl/factory"
3436
"github.com/m-lab/etl/metrics"
3537
"github.com/m-lab/etl/row"
36-
"github.com/m-lab/go/bqx"
3738
)
3839

3940
// insertsBeforeRowJSONCount controls how often we perform a wasted JSON marshal

cmd/generate_schema_docs/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ import (
2929
"strings"
3030

3131
"cloud.google.com/go/bigquery"
32-
"github.com/m-lab/go/bqx"
32+
33+
"github.com/m-lab/go/cloud/bqx"
3334
"github.com/m-lab/go/flagx"
3435
"github.com/m-lab/go/rtx"
3536

cmd/update-schema/update.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ import (
1616
"os"
1717
"time"
1818

19-
"github.com/m-lab/go/flagx"
19+
"cloud.google.com/go/bigquery"
20+
"google.golang.org/api/googleapi"
2021

21-
"github.com/m-lab/etl/schema"
22+
"github.com/m-lab/go/cloud/bqx"
23+
"github.com/m-lab/go/flagx"
2224
"github.com/m-lab/go/rtx"
2325

24-
"cloud.google.com/go/bigquery"
25-
"github.com/m-lab/go/bqx"
26-
"google.golang.org/api/googleapi"
26+
"github.com/m-lab/etl/schema"
2727
)
2828

2929
// CreateOrUpdateTCPInfo will update existing TCPInfo table, or create new table if update fails.

parser/ndt5_result.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
"cloud.google.com/go/bigquery"
1414

1515
v2as "github.com/m-lab/annotation-service/api/v2"
16+
1617
"github.com/m-lab/etl/annotation"
1718
"github.com/m-lab/etl/etl"
1819
"github.com/m-lab/etl/metrics"
@@ -65,7 +66,7 @@ func (dp *NDT5ResultParser) IsParsable(testName string, data []byte) (string, bo
6566

6667
// NOTE: data.NDT5Result is a JSON object that should be pushed directly into BigQuery.
6768
// We read the value into a struct, for compatibility with current inserter
68-
// backend and to eventually rely on the schema inference in m-lab/go/bqx.CreateTable().
69+
// backend and to eventually rely on the schema inference in m-lab/go/cloud/bqx.CreateTable().
6970

7071
// ParseAndInsert decodes the data.NDT5Result JSON and inserts it into BQ.
7172
func (dp *NDT5ResultParser) ParseAndInsert(meta map[string]bigquery.Value, testName string, test []byte) error {

schema/annotation.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ import (
44
"time"
55

66
"cloud.google.com/go/bigquery"
7-
"github.com/m-lab/etl/row"
8-
"github.com/m-lab/go/bqx"
7+
8+
"github.com/m-lab/go/cloud/bqx"
99
"github.com/m-lab/uuid-annotator/annotator"
10+
11+
"github.com/m-lab/etl/row"
1012
)
1113

1214
// AnnotationRow defines the BQ schema using 'Standard Columns' conventions for

schema/annotation_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import (
44
"testing"
55

66
"cloud.google.com/go/bigquery"
7-
"github.com/m-lab/go/bqx"
7+
8+
"github.com/m-lab/go/cloud/bqx"
89
)
910

1011
func TestAnnotationRow_Schema(t *testing.T) {

schema/bindata.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

schema/descriptions/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This directory contains BigQuery Field Description YAML files for schema
44
definitions in github.com/m-lab/etl/schema.
55

66
The content of these files should be formatted as bqx.SchemaDocs from the
7-
github.com/m-lab/go/bqx package.
7+
github.com/m-lab/go/cloud/bqx package.
88

99
Multiple files can be applied to the same schema.
1010

schema/ndt5_result.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ package schema
22

33
import (
44
"cloud.google.com/go/bigquery"
5-
"github.com/m-lab/etl/row"
6-
"github.com/m-lab/go/bqx"
5+
6+
"github.com/m-lab/go/cloud/bqx"
77
"github.com/m-lab/ndt-server/data"
8+
9+
"github.com/m-lab/etl/row"
810
)
911

1012
// NDT5ResultRow defines the BQ schema for the data.NDT5Result produced by the

0 commit comments

Comments
 (0)