Skip to content

feat(bigquery): allow the user to ask for skipping parsing rows when quering#7848

Open
rafal-hawrylak wants to merge 1 commit intogoogleapis:mainfrom
rafal-hawrylak:bigquery_optional_raw_rows
Open

feat(bigquery): allow the user to ask for skipping parsing rows when quering#7848
rafal-hawrylak wants to merge 1 commit intogoogleapis:mainfrom
rafal-hawrylak:bigquery_optional_raw_rows

Conversation

@rafal-hawrylak
Copy link

Summary
This PR introduces a new optional boolean flag, skipParsing, to the BigQuery.query, Table.getRows, and Job.getQueryResults methods.

When skipParsing is set to true, the library bypasses the internal mergeSchemaWithRows_ logic. Instead of returning idiomatic JavaScript objects (where BigQuery types are mapped to JS types), the rows result will contain the raw BigQuery API wire format (e.g., an array of { f: [{ v: '...' }] } objects).

Motivation
Providing access to raw rows offers two primary benefits:

  1. Performance: For very large result sets, the overhead of merging the schema with rows and performing type conversions can be significant. Bypassing this step allows for faster processing when the consumer handles their own parsing.
  2. Flexibility: Users who require the specific BigQuery JSON structure for downstream systems or custom serialization can now access it directly without the library's opinionated mapping.

@rafal-hawrylak rafal-hawrylak requested a review from a team as a code owner March 23, 2026 15:15
@product-auto-label product-auto-label bot added the api: bigquery Issues related to the BigQuery API. label Mar 23, 2026
@feywind feywind added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 24, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 24, 2026
@feywind
Copy link
Contributor

feywind commented Mar 24, 2026

/gcbrun

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

Labels

api: bigquery Issues related to the BigQuery API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants