diff --git a/bigquery/bigquery.go b/bigquery/bigquery.go index 0a32f02c3d52..8029d303cf5c 100644 --- a/bigquery/bigquery.go +++ b/bigquery/bigquery.go @@ -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) diff --git a/bigquery/job.go b/bigquery/job.go index 1e08e899c519..1a8bb70011d4 100644 --- a/bigquery/job.go +++ b/bigquery/job.go @@ -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