Skip to content

Conversation

@paulw54jrn
Copy link
Contributor

Fix the issue where there are many tables in a dataset, get_all_tables() would only return a subset of all the tables.
Also added cache option to get_all_tables().

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can just be if cache instead of if cache is True.

Likewise, I think we can just do the truthy if self.cache.get(dataset_id) instead of is not None.

@tylertreat
Copy link
Owner

Looks good other than minor style nitpicks. Might be out of scope for this PR, but it could be useful to provide an API to allow users to page over dataset tables.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a typo: nextPageToekn

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, if we use while page_token for the loop, this can just be res.get('nextPageToken'). Likewise for the initial assignment of page_token on line 817.

tylertreat added a commit that referenced this pull request Dec 23, 2014
FIX: get_all_page fetch all tables according to NEXT_PAGE_TOKEN
@tylertreat tylertreat merged commit e6d2bb2 into tylertreat:master Dec 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants