Skip to content

Commit

Permalink
feat(bigquery): expose ProjectID from Client & Job
Browse files Browse the repository at this point in the history
  • Loading branch information
derekperkins committed May 9, 2021
1 parent 33dd86d commit cba5877
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bigquery/bigquery.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ func (c *Client) Close() error {
return nil
}

// ProjectID returns the client's ProjectID.
func (c *Client) ProjectID() string {
return c.projectID
}

// Calls the Jobs.Insert RPC and returns a Job.
func (c *Client) insertJob(ctx context.Context, job *bq.Job, media io.Reader) (*Job, error) {
call := c.bqs.Jobs.Insert(c.projectID, job).Context(ctx)
Expand Down
5 changes: 5 additions & 0 deletions bigquery/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ func (j *Job) ID() string {
return j.jobID
}

// ProjectID returns the job's ProjectID.
func (j *Job) ProjectID() string {
return j.projectID
}

// Location returns the job's location.
func (j *Job) Location() string {
return j.location
Expand Down

0 comments on commit cba5877

Please sign in to comment.