-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BigQuery Storage: Add support for arrow format in BQ Read API #8644
Conversation
|
||
_AVRO_BYTES_OPERATION = "parse ReadRowResponse messages with Avro bytes" | ||
_ARROW_BYTES_OPERATION = "parse ReadRowResponse messages with Arrow bytes" | ||
_FASTAVRO_REQUIRED = "fastavro is required to {operation}." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume these parameterized errors are for when you do things like to_arrow with avro bytes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this is vestigial from when I was planning to implement to_arrow
for Avro streams. Removed for now.
|
||
Args: | ||
read_session (google.cloud.bigquery_storage_v1beta1.types.ReadSession): | ||
A read session. This is required because it contains the schema | ||
used in the stream messages. | ||
""" | ||
if fastavro is None: | ||
raise ImportError(_FASTAVRO_REQUIRED) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this need to be parameterized as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the {operation}
from error message since I didn't actually need it.
_StreamParser
abstract, and breaks it into two implementations: one for arrow and one for avro. The implementation is selected is based on the schema set in the ReadSession.to_arrow
to reader classes.Split out from #8551 so that the changes to
google-cloud-bigquery-storage
can be submitted and released separately from the changes togoogle-cloud-bigquery
.