-
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
Add examples for browsing / copying / exporting table data. #1016
Add examples for browsing / copying / exporting table data. #1016
Conversation
Will address once base is merged |
>>> dataset = client.dataset('dataset_name') | ||
>>> table = dataset.table(name='person_ages') | ||
>>> rows, next_page_token = table.data(max_results=100) # API request | ||
>>> rows.csv.headers |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@dhermes PTAL. |
I have a comment still un-addressed
|
The https://cloud.google.com/bigquery/docs/reference/v2/tabledata/list API doesn't show any schema in the result set, which implies that the fields must correspond to the table's schema. I had imagined that |
So how does that relate to my question. Do you plan on implementing access in another form? |
If we can predict what people want to do, we can add helpers. Otherwise, we can document a pattern like: for row in rows:
for field, value in zip(table.schema, row):
do_somthing(field, value) |
Can you add that snippet to these docs? (With a spelling patch to |
LGTM |
Add examples for browsing / copying / exporting table data.
Uses #1014 as a base.