Documentation ¶
Overview ¶
Package bqexporter handles export to BigQuery.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureViews ¶
func ExportTestAnalyses ¶
ExportTestAnalyses exports test failure analyses to BigQuery. A test failure analysis will be exported if it satisfies the following conditions:
- It has not been exported yet.
- It was created within the past 14 days.
- Has ended.
- If it found culprit, then actions must have been taken.
The limit of 14 days is chosen to save the query time. It is also because if the exporter is broken for some reasons, we will have 14 days to fix it.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides methods to export test analyses to BigQuery via the BigQuery Write API.
func NewClient ¶
NewClient creates a new client for exporting test analyses via the BigQuery Write API. projectID is the project ID of the GCP project.
func (*Client) ReadTestFailureAnalysisRows ¶
func (client *Client) ReadTestFailureAnalysisRows(ctx context.Context) ([]*TestFailureAnalysisRow, error)
ReadTestFailureAnalysisRows returns the Test Failure analysis rows in test_failure_analyses table that has created_time within the past 14 days.
type ExportClient ¶
type TestFailureAnalysisRow ¶
type TestFailureAnalysisRow struct { // We only need analysis ID for now. AnalysisID int64 }