Skip to content
This repository was archived by the owner on Feb 7, 2026. It is now read-only.
This repository was archived by the owner on Feb 7, 2026. It is now read-only.

table.create() does not respect the projectId at the dataset level #1265

@atrbgithub

Description

@atrbgithub

This is very similar to this issue which was raised about createDataset not supporting the supplying of a projectId.

Now that issue has been fixed ( thank you! ), when trying to use that with table.create() you get an error:

value set through a parameter is inconsistent with a value set in the request

For example, lets say we have the following code:

const bigqueryClient = new BigQuery()

let ds = new Dataset(bigqueryClient, "a_test_dataset", {
   projectId: "a-test-project"
 })

// This now works fine
ds.create()

let table = ds.table("a_test_table")

// This produces the error
await table.create()

gcloud config:

$ gcloud config list|grep project
$ project = some-default-project-id

The error thrown is:

ApiError: Value some-default-project-id in content does not agree with value a-test-project. This can happen when a value set through a parameter is inconsistent with a value set in the request.

Metadata

Metadata

Assignees

Labels

api: bigqueryIssues related to the googleapis/nodejs-bigquery API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions