Documentation ¶
Overview ¶
Package groupexporter provides functions to export grouped changepoints to BigQuery.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChangepointKey ¶
func ChangepointKey(cp *changepoints.ChangepointDetailRow) string
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides methods to export grouped changepoint rows to BigQuery via the BigQuery Write API.
func NewClient ¶
NewClient creates a new client for exporting grouped changepoints via the BigQuery Write API. projectID is the project ID of the GCP project.
type Exporter ¶
type Exporter struct {
// contains filtered or unexported fields
}
Exporter provides methods to batch insert grouped changepoint row to BigQuery.
func NewExporter ¶
func NewExporter(client InsertClient) *Exporter
NewExporter instantiates a new Exporter. The given client is used to insert rows into BigQuery.
func (*Exporter) Export ¶
func (e *Exporter) Export(ctx context.Context, groups [][]*changepoints.ChangepointDetailRow, version time.Time) error
Export flattens and exports the grouped changepoints to BigQuery.
type FakeClient ¶
type FakeClient struct {
Insertions []*bqp.GroupedChangepointRow
}
FakeClient represents a fake implementation of the test variant branch exporter, for testing.
func NewFakeClient ¶
func NewFakeClient() *FakeClient
NewFakeClient creates a new FakeClient for exporting test variant branches.
func (*FakeClient) Insert ¶
func (fc *FakeClient) Insert(ctx context.Context, rows []*bqp.GroupedChangepointRow) error
Insert inserts the given rows in BigQuery.
type InsertClient ¶
type InsertClient interface { // Insert inserts the given rows into BigQuery. Insert(ctx context.Context, rows []*bqpb.GroupedChangepointRow) error }
InsertClient defines an interface for inserting rows into BigQuery.