Least Code Image Categorization in BigQuery

PDE By islever Editorial Last updated

Building the pipelines. Designing for a data platform.

Short answer

D Use the ML.GENERATE_TEXT function along with object tables to analyze the images, and store the JSON output in a BigQuery table.

Question

Your organization has thousands of images stored in Cloud Storage. The organization's data analysts need to categorize these images upon analyzing the image content and store the results in a structured format for integration with other BigQuery datasets. You need a solution that allows the analysts to perform this task with the least amount of coding. What should you do?
  1. Use the Gemini 2.5 Pro model in Vertex AI to analyze the images and store the results in BigQuery.
  2. Use the ML.UNDERSTAND_TEXT function along with object tables to analyze the images, and store the JSON output in a Cloud Storage bucket.
  3. Use Vertex AI Vision API to analyze the images and store the results in BigQuery.
  4. Use the ML.GENERATE_TEXT function along with object tables to analyze the images and store the JSON output in a BigQuery table. Correct Answer

Key Takeaways

The trap is choosing external APIs like Vertex AI Vision; the key insight is leveraging native BigQuery ML functions for zero-code SQL-based workflows.

Learn how to categorize Cloud Storage images using BigQuery object tables and ML.GENERATE_TEXT for minimal coding. Correct answer is D.

Common mistake: Option C is a common distractor because Vertex AI Vision is good for images, but it requires significant custom code to integrate, violating the 'least coding' constraint.

Expert Analysis

Constraint Analysis: Least Coding and Structured Output The question requires analyzing thousands of images stored in Cloud Storage, categorizing them by content, storing results in a structured format, and integrating with other BigQuery datasets. The key constraint is performing this task with the least amount of coding.

Option D (Correct) leverages BigQuery's native capabilities. By creating an object table that references the Cloud Storage images, analysts can use SQL to call ML.GENERATE_TEXT (which utilizes Gemini models for multimodal analysis) directly within BigQuery. This approach allows the output to be written directly into a BigQuery table using standard SQL statements (CREATE TABLE... AS SELECT...). Since the data remains within the BigQuery ecosystem, integration with other datasets is seamless without external orchestration or complex code pipelines. A comment supports this, noting it keeps the workflow mostly inside BigQuery using SQL.

Option C suggests using the Vertex AI Vision API. While powerful, calling an external API typically requires writing custom code (e.g., Python scripts, Dataflow jobs) to read from Cloud Storage, send requests, handle authentication, and write results back to BigQuery. This violates the 'least amount of coding' constraint compared to native SQL operations.

Option B uses ML.UNDERSTAND_TEXT, which is designed for text understanding, not image analysis. Furthermore, it stores JSON in Cloud Storage, complicating integration with BigQuery datasets compared to Option D.

Option A mentions 'Gemini 2.5 Pro', which is not a standard model name for this context (Gemini Pro/Flash are current), and deploying a full Vertex AI pipeline involves more setup and coding than native BigQuery ML functions.

Exam Strategy

When 'least coding' is specified, prioritize managed services or native database functions over custom scripts or external API integrations. In BigQuery questions, check if OBJECT tables or ML.* functions can solve the problem entirely within SQL.

Frequently Asked Questions

Why not use Vertex AI Vision API?

Vertex AI Vision requires custom code to orchestrate data movement between Cloud Storage and BigQuery, whereas BigQuery ML functions allow SQL-only processing.

What is an object table in BigQuery?

An object table is a special type of table that references files in Cloud Storage, allowing you to query unstructured data like images directly using SQL.

More PDE FAQ →

Community Votes

D
100%

100% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.

Discussion 1 contributions

Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.

From public community threads 1

  1. polung 👍 1 Answered D
    I think correct answer is D. Option D allows the analysts to keep the workflow mostly inside BigQuery: Cloud Storage images → BigQuery object table → ML.GENERATE_TEXT with Gemini → JSON classification output → BigQuery table → Integration with other BigQuery datasets This requires much less custom code because analysts can use SQL and BigQuery object tables to reference the images directly from Cloud Storage. Option C is possible, but it would likely require custom code to list the GCS images, call the Vision API for each image, parse the response, and insert the results into BigQuery. Since the question asks for the least amount of coding and structured results for BigQuery integration, D seems like the best choice.

Reader comments & corrections

No reader corrections yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

← Back to PDE Study Guide