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

Request to improve the tqdm progress bar and output #1652

Open
meredithslota opened this issue Aug 23, 2023 · 2 comments
Open

Request to improve the tqdm progress bar and output #1652

meredithslota opened this issue Aug 23, 2023 · 2 comments
Labels
api: bigquery Issues related to the googleapis/python-bigquery API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@meredithslota
Copy link
Contributor

          hi @aribray, looks like the issue is now solved! Thank you very much for that.

I only have one nitpick regarding the new progress bar setup: it's a bit weird to have two progress bars, and one of them is pushed to the right when the job ID appears:

image

I suppose it would be better to have just a single progress bar on its own line (job ID should be its own line too).

If you want to make the output more complete, I've been also showing the data processed at the very end in my own bigquery magic like this:

from humanize.filesize import naturalsize
...
if args.info:
    processed = naturalsize(query.total_bytes_processed)
    display(ipywidgets.HTML(value='Data processed: ' + (
        f'<b>{processed}</b>' if not query.cache_hit
        else 'none <b>(returned from cache)</b>'
    )))

With this addition the output looks like this:

image

It might look better if you add a colon after the "Job ID" too, but that's just my subjective preference.

Originally posted by @GergelyKalmar in #1146 (comment)

@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery API. label Aug 23, 2023
@meredithslota meredithslota added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. and removed api: bigquery Issues related to the googleapis/python-bigquery API. labels Aug 23, 2023
@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery API. label Aug 24, 2023
@kiraksi kiraksi assigned kiraksi and unassigned kiraksi Nov 2, 2023
@tswast
Copy link
Contributor

tswast commented Nov 7, 2023

I believe the two bars are from (a) running the query and (b) downloading the data. These are created in two very different places in the code, so implementing this will require some refactoring.

@chalmerlowe
Copy link
Contributor

chalmerlowe commented Nov 22, 2023

@tswast @meredithslota

If the two progress bars represent two separate processes (running the query and downloading the data), as Tim describes, do we need to refactor this to create only one progress bar OR is it more informative for the user to have the two progress bars for long running processes OR large data downloads?

If we choose to go with only one bar.... seems like the "running the query" bar is generally more informative on a system level.

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 googleapis/python-bigquery API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

4 participants