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

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

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

Activity

  1. added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    and removed
    🚨This issue needs some love.
    triage meI really want to be triaged.
    on Jun 16, 2021
  2. added
    priority: p2Moderately-important priority. Fix may not be included in next release.
    and removed
    🚨This issue needs some love.
    triage meI really want to be triaged.
    on Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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