-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
api: bigqueryIssues related to the BigQuery API.Issues related to the BigQuery API.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
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
Metadata
Metadata
Assignees
Labels
api: bigqueryIssues related to the BigQuery API.Issues related to the BigQuery API.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.