Skip to content
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

Multiple stream example needs clarify #121

Open
baggio002 opened this issue Jan 19, 2021 · 2 comments
Open

Multiple stream example needs clarify #121

baggio002 opened this issue Jan 19, 2021 · 2 comments
Assignees
Labels
api: bigquerystorage Issues related to the googleapis/python-bigquery-storage API. samples Issues that are directly related to samples. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@baggio002
Copy link

When use 1 stream following this example

# This example reads from only a single stream. Read from multiple streams
# to fetch data faster. Note that the session may not contain any streams
# if there are no rows to read.
stream = read_session.streams[0]
reader = bqstorageclient.read_rows(stream.name)
# Parse all Arrow blocks and create a dataframe. This call requires a
# session, because the session contains the schema for the row blocks.
dataframe = reader.to_dataframe(read_session)
print(dataframe.head())
, the example perhaps make confusion.

The example states that we can read from multiple streams in order to get data faster. It does not say that multiple streams may be generated automatically if there is a lot of data and so you need to get data from all streams.

Thanks!

@product-auto-label product-auto-label bot added the api: bigquerystorage Issues related to the googleapis/python-bigquery-storage API. label Jan 19, 2021
@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Jan 20, 2021
@tswast
Copy link
Contributor

tswast commented Jan 22, 2021

Thanks for the report. Yes, we can improve these comments.

Note: I did recently change this sample to request a maximum of 1 stream so that the sample does not miss rows that have been assigned to other streams. #114

@tswast tswast added type: docs Improvement to the documentation for an API. and removed triage me I really want to be triaged. labels Jan 22, 2021
@shollyman shollyman self-assigned this Jan 23, 2023
@meredithslota
Copy link

Converting this to a feature request for a code sample handling multiple streams, as the original issue has been fixed as per Tim. Thanks!

@meredithslota meredithslota added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. samples Issues that are directly related to samples. and removed type: docs Improvement to the documentation for an API. labels Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquerystorage Issues related to the googleapis/python-bigquery-storage API. samples Issues that are directly related to samples. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

5 participants