Skip to content

BigQuery: service.getDataset(DatasetId).get(String) does not find table in different project #1369

@coryfoo

Description

@coryfoo

Environment details

  1. Specify the API at the beginning of the title. For example, "BigQuery: ...").
    General, Core, and Other are also allowed as types
  2. OS type and version: OSX / Linux
  3. Java version: JDK 11
  4. bigquery version(s): 1.111.0

Steps to reproduce

  1. Initialize BigQuery service in project A
  2. Call getDataset using a DatasetId consisting of another project (eg, project B) and a valid dataset in that project
  3. Call get for a table ID of a table that exists in that project.
  4. The get returns null, when it should return a Table object

Code example

final String projectA = "..."; final String projectB = "..."; final BigQuery instance = BigQueryOptions .newBuilder() .setProjectId(projectA) .build() .getService(); final String datasetName = "some_dataset"; final String tableName = "some_table"; final Dataset ds = instance.getDataset(DatasetId.of(projectB, some_dataset)); ds.get(tableName); // <--- this returns null, should not

Metadata

Metadata

Assignees

Labels

20% candidateapi: bigqueryIssues related to the googleapis/java-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