table.create() does not respect the projectId at the dataset level
atrbgithub opened this issue · comments
atrbgithub commented
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.