Skip to content

v0.7.x: Data inserted via tabledata.insertAll is not visible to subsequent queries #470

@jan-pluta-getmoss

Description

@jan-pluta-getmoss

What happened?

After upgrading from v0.6.6 to v0.7.0 (or v0.7.1), data inserted via tabledata.insertAll (streaming inserts using the Java BigQuery client) is no longer visible to subsequent queries. The queries return 0 rows.

The exact same code works correctly with v0.6.6.

What did you expect to happen?

The query should return the inserted row. This works correctly in v0.6.6.

How can we reproduce it (as minimally and precisely as possible)?

  1. Start the emulator with --data-from-yaml pointing to a YAML schema file defining tables (empty data:)
  2. Insert rows using the Java BigQuery.insertAll() API (equivalent to tabledata.insertAll REST endpoint)
  3. Query the table — returns 0 rows

Schema (YAML):

projects:
  - id: dummy-data-project
    datasets:
      - id: dummy_services_sensitive
        tables:
          - id: test_table
            columns:
              - name: id
                type: STRING
                mode: REQUIRED
              - name: value
                type: STRING
                mode: REQUIRED
            data:

Insert (Java):

bigQuery.insertAll(InsertAllRequest.newBuilder(
        TableId.of("dummy-data-project", "dummy_services_sensitive", "test_table"))
    .addRow(Map.of("id", "1", "value", "hello"))
    .build());
// Response has no errors

Query (Java):

TableResult result = bigQuery.query(QueryJobConfiguration.newBuilder(
    "SELECT * FROM `dummy-data-project.dummy_services_sensitive.test_table`")
    .build());
// Returns 0 rows

Anything else we need to know?

  • The emulator's own e2e conformance suite does not test tabledata.insertAll followed by queries — it only tests queries against pre-loaded data (via --data-from-yaml). This may explain why this regression was not caught.
  • The InsertAllResponse from the emulator reports no errors — the insert appears to succeed.
  • This was discovered in a CI pipeline where Testcontainers starts the emulator fresh (no container reuse). On local dev machines with withReuse(true), the old v0.6.6 container may persist, masking the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions