Skip to content

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

Merged
feywind merged 1 commit intogoogleapis:mainfrom
rafal-hawrylak:bigquery_optional_raw_rows
Mar 26, 2026
Merged

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

Conversation

@rafal-hawrylak
Copy link
Contributor

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

@rafal-hawrylak rafal-hawrylak force-pushed the bigquery_optional_raw_rows branch from de94afa to aec2ea1 Compare March 25, 2026 22:06
@feywind
Copy link
Contributor

feywind commented Mar 25, 2026

/gcbrun

@pearigee
Copy link
Contributor

/gcbrun

@pearigee pearigee added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 25, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 25, 2026
@pearigee
Copy link
Contributor

/gcbrun

@rafal-hawrylak rafal-hawrylak force-pushed the bigquery_optional_raw_rows branch from aec2ea1 to d12c580 Compare March 25, 2026 23:48
@pearigee
Copy link
Contributor

/gcbrun

@pearigee pearigee added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 25, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 25, 2026
Copy link

@apilaskowski apilaskowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM from Dataform team.

@feywind feywind merged commit e500d40 into googleapis:main Mar 26, 2026
30 of 31 checks passed
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.

5 participants