Closed
Description
Hi,
I am using the BigQuery Python client v0.28.0
Using the bigquery client to list all tables in a dataset using method list_dataset_tables
, I get an iterator of table references in the dataset. When I try to access the num_rows
and schema
properties of the Table object it returns None
and []
.
But when I access the table using client.get_table()
I am able to access both the num_rows and schema properties.
I am confused since both the methods return a google.cloud.bigquery.table.Table
object but are inconsistent.
for table in bqclient.list_dataset_tables(dataset_ref):
print(table.num_rows)
print(table.schema)
Returns None and []
table = bqclient.get_table(table)
print(table.num_rows)
print(table.schema)
Returns the number of rows and list of schemaFields
Thanks