File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -1019,6 +1019,9 @@ def _build_resource(self, filter_fields):
10191019 def __repr__ (self ):
10201020 return "Table({})" .format (repr (self .reference ))
10211021
1022+ def __str__ (self ):
1023+ return f"{ self .project } .{ self .dataset_id } .{ self .table_id } "
1024+
10221025
10231026class TableListItem (_TableBase ):
10241027 """A read-only table resource from a list operation.
Original file line number Diff line number Diff line change 2727
2828import google .api_core .exceptions
2929
30+ from google .cloud .bigquery .table import TableReference
31+
3032from google .cloud import bigquery_storage
3133from google .cloud .bigquery_storage_v1 .services .big_query_read .transports import (
3234 grpc as big_query_read_grpc_transport ,
@@ -1410,6 +1412,11 @@ def test___repr__(self):
14101412 )
14111413 self .assertEqual (repr (table1 ), expected )
14121414
1415+ def test___str__ (self ):
1416+ dataset = DatasetReference ("project1" , "dataset1" )
1417+ table1 = self ._make_one (TableReference (dataset , "table1" ))
1418+ self .assertEqual (str (table1 ), "project1.dataset1.table1" )
1419+
14131420
14141421class Test_row_from_mapping (unittest .TestCase , _SchemaBase ):
14151422
You can’t perform that action at this time.
0 commit comments