Skip to content

[Service] Implement BigQuery (REST + Storage gRPC) #40

Description

@hectorvent

Summary

Implement BigQuery — the GCP analytics warehouse. Highest-value data service; community emulators (e.g. goccy/bigquery-emulator) prove demand. The main cost is a SQL engine, so this should be phased.

Protocol / transport

  • Core API: REST (Discovery bigquery.googleapis.com) — datasets, tables, jobs, tabledata
  • Storage Read/Write API: gRPC google.cloud.bigquery.storage.v1

Endpoint / auth bypass

BIGQUERY_EMULATOR_HOST (supported by some clients) / client apiEndpoint override.

Authoritative reference

  • REST Discovery document for bigquery.googleapis.com
  • Proto: local/google/googleapis/google/cloud/bigquery/storage/v1/storage.proto
  • SDK: local/google/google-cloud-java/java-bigquery, java-bigquerystorage

Scope (phased)

  • Phase 1 (metadata + ingest): Datasets CRUD, Tables CRUD + schema, tabledata.insertAll (streaming inserts), trivial SELECT * / COUNT.
  • Phase 2 (SQL): embed a GoogleSQL-compatible engine for jobs.query / jobs.insert(QUERY) + getQueryResults. Document dialect deviations explicitly.
  • Phase 3: Storage Write API (gRPC).

Parity notes

  • Job lifecycle (PENDING/RUNNING/DONE) + getQueryResults paging.
  • GoogleSQL dialect; surface unsupported SQL as a clear error rather than silent divergence.

Test plan

java-bigquery: create dataset/table, insertAll, run a query and read results back; assert schema + row values.


Implementation guidance: Follow the google-parity workflow — read the authoritative proto/SDK under local/google/* before implementing, mirror the wire shape exactly, and validate with GCP SDK-based compatibility tests (compatibility-tests/sdk-test-java). See AGENTS.md → "Adding a New GCP Service". Keep storage namespaced by project ID via StorageFactory.

Upstream references (mirrored locally under local/google/*):

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bigqueryBigQueryenhancementNew feature or requestmissing gcp servicesRequest for a GCP service not yet implemented in floci-gcp

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions