googleapis / googleapis/google-cloud-python

Request to improve the `tqdm` progress bar and output

Offen
#15,511 3 Kommentare 1 Reaktion 1 zugewiesene Person Beansprucht von @jiaxunwu Auf GitHub ansehen
api: bigquery type: feature request
Vorherrschende Sprache
Python
Sterne
5.4k
Forks
1.8k
Ø Merge
3 T. 4 Std.
Gemergte PRs (30 T.)
122

Beschreibung

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](https://user-images.githubusercontent.com/5601876/200286260-fca6cba9-905b-4f8e-8ed5-46989d38f09f.png)

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'{processed}' if not query.cache_hit
else 'none (returned from cache)'
)))
```

With this addition the output looks like this:

![image](https://user-images.githubusercontent.com/5601876/200287992-5da8d1b9-511c-4fec-b7f2-297994cbb3ca.png)

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 https://github.com/googleapis/python-bigquery/issues/1146#issuecomment-1305399150_

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.