tylertreat/BigQuery-Python

Public method for getting all tables for a dataset

ruxandraburtica opened this issue · 2 comments

Need

Currently, there's no support for getting all tables from a given dataset (there is _get_all_tables, but it skips tables that do not respect a certain format).

Solution

Add get_all_tables(dataset_id) to the BigQueryClient class.

I'd second this proposal. There is a need for
get_all_tables(dataset_id)

The _get_all_tables is misnamed, since as ruxandraburtica pointed out, it excludes tables that do not follow a specific format that includes a date and an appID.

Additionally, the _get_all_tables method does not support the common format for daily tables, as used by e.g. Google Analytics exports to BQ.
The format for these date-ranged tables is as follows:
ga_sessions_20150430

the _get_all_tables method should return a date object (?) and the table prefix, allowing the date ranges to be queried as intended.

Addressed in #98.