BigQuery has moved ObjectRef from preview to General Availability, adding a built‑in STRUCT type that references objects stored in Cloud Storage. The type can be used in regular tables, enabling SQL queries that combine structured rows with unstructured files such as images, videos, or PDFs.
What Changed?
ObjectRef is now a GA data type that represents a Cloud Storage URI, an optional authorizer, a version string, and a JSON field for additional metadata. Because it lives inside a BigQuery table, the pointer is treated as a first‑class column. The platform also exposes a multimodal query path: a single SQL statement can pass an ObjectRef to Gemini models via the AI.AGG function, returning embeddings, classifications, or extracted features without external orchestration.
SELECT AI.AGG(image_ref, "Summarize the major categories of pictures") FROM `bigquery-public-data.cymbal_pets.products`;
Why It Matters to Practitioners
AI engineers gain a direct route to feed raw media into generative models without writing glue code or moving files into a separate compute environment. Cloud and platform engineers can keep large media assets in Cloud Storage while querying them serverlessly, preserving data gravity and avoiding duplicate storage. DevOps and SRE teams see a reduction in pipeline complexity: inference, feature extraction, and downstream analytics can be expressed as pure SQL or BigQuery Python UDFs, eliminating the need for dedicated inference clusters. Security engineers benefit from a unified access model—BigQuery IAM policies now govern both the structured row and the referenced object, simplifying audit and policy enforcement.
Architectural and Operational Implications
ObjectRef introduces a zero‑copy architecture. The actual bytes remain in Cloud Storage; BigQuery reads them on demand during query execution. This design decouples the lifecycle of the storage object from the table row, allowing independent updates. Versioning is supported through the version field, which can capture a GCS generation number, enabling reproducible inference even if the underlying file changes later.
SQL‑centric pipelines can now perform full‑fidelity ETL: ingest, transform, and annotate unstructured data without leaving the warehouse. Python UDFs can accept an ObjectRef, letting teams bring libraries such as OpenCV into the query engine for custom processing. Because the compute is fully serverless, operational overhead related to cluster provisioning, scaling, and patching is removed.
Security and Governance Considerations
Access to an ObjectRef follows the same IAM checks that protect the containing BigQuery table. Auditing therefore captures both the structured query and the read of the underlying Cloud Storage object. Unified policies reduce the risk of orphaned permissions that can arise when separate services manage data access. However, practitioners should verify that the authorizer field, if used, aligns with their organization’s credential management practices, and they should monitor any custom JSON metadata for sensitive information.
Related CloudNinjas coverage: Google Cloud.
What This Means For Practitioners
Teams should inventory existing pipelines that move media files into temporary storage for model inference and evaluate a migration path to ObjectRef‑based queries. Validate that IAM policies on the BigQuery dataset also grant the required read rights on the referenced Cloud Storage buckets. Test version‑aware queries to ensure reproducibility when source files are updated. Finally, prototype a Python UDF that consumes an ObjectRef to confirm that required libraries are available in the BigQuery runtime.

