# BigQuery Object Tables: A Practical Introduction


**BigQuery** has always been a SQL engine for tabular data. Object tables add an interesting twist to that.  
  
Instead of rows containing values, an object table gives you one row per file — pointing at data stored in Cloud Storage: images, PDFs, audio, video, or JSON.  
  
Each row includes:  
→ the GCS URI  
→ file metadata (size, content type, updated timestamp)  
→ a hidden data column that can be passed directly into ML functions  
  
That last part is especially important. You can feed that data straight into ML.GENERATE\_TEXT or AI.GENERATE\_EMBEDDING — meaning you can run inference on unstructured data directly with BigQuery **SQL** .  
  
BigQuery is no longer just querying tables. It’s increasingly becoming an execution layer over files and AI models too.

Let's now walk through a practical example.  
  
First, we're going to start with a Google Cloud Storage bucket.

![](https://cdn.hashnode.com/uploads/covers/641c1535429c76261884ecba/586166fc-b628-4dc9-bdca-07ec7b2a7672.png align="center")

These are images of animals sourced [Open Access Animals](https://www.si.edu/spotlight/open-access-animals) collection.

![](https://cdn.hashnode.com/uploads/covers/641c1535429c76261884ecba/b4c553f6-d9b4-40b3-85a2-0ebf499625d2.png align="center")

Next, just like in the [BigLake tutorial](https://datawise.dev/bigquery-biglake-tables-explained-what-they-are-and-when-to-use-them) we'd need a BigQuery connection created with its service account being granted **both** `storage.objectViewer` on the bucket *and* `Vertex AI User` on the project.

  
We can now create the object table:

![](https://cdn.hashnode.com/uploads/covers/641c1535429c76261884ecba/58bf9143-451a-4de8-bc28-1f0afd10d999.png align="center")

Here are the fields exposed:

![](https://cdn.hashnode.com/uploads/covers/641c1535429c76261884ecba/c08fb47e-e36b-4c5f-8411-c715ba38043a.png align="center")

![](https://cdn.hashnode.com/uploads/covers/641c1535429c76261884ecba/5a0a076d-4702-469b-bfae-de0d7bf81d97.png align="center")

We can now create the model that we will be passing these images to.

![](https://cdn.hashnode.com/uploads/covers/641c1535429c76261884ecba/a7bd1a3e-a870-435d-991d-13802ab8c150.png align="center")

  
We're going to use ML.GENERATE\_TEXT function, providing the object table to the model we've previously created to identify what animal is depicted on each image.

![](https://cdn.hashnode.com/uploads/covers/641c1535429c76261884ecba/cd353bbc-e869-42ad-aa64-ddcd58d7b3d0.png align="center")

As you can see, the model correctly identified each of the animals.

The animal detection example might look simple, but it opens new possibilites. Product image classification, PDF extraction, audio transcription would have the same approach. If your data lives in GCS and your questions can be expressed as a prompt, BigQuery can now answer them.

Thanks for reading and stay tuned for more content like this.
