File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -760,6 +760,23 @@ def schema(self):
760760 prop = self ._properties .get ("schema" , {})
761761 return [SchemaField .from_api_repr (field ) for field in prop .get ("fields" , [])]
762762
763+ @property
764+ def connection_id (self ):
765+ """Optional[str]: [Experimental] ID of a BigQuery Connection API
766+ resource.
767+
768+ .. WARNING::
769+
770+ This feature is experimental. Pre-GA features may have limited
771+ support, and changes to pre-GA features may not be compatible with
772+ other pre-GA versions.
773+ """
774+ return self ._properties .get ("connectionId" )
775+
776+ @connection_id .setter
777+ def connection_id (self , value ):
778+ self ._properties ["connectionId" ] = value
779+
763780 @schema .setter
764781 def schema (self , value ):
765782 prop = value
Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ def test_to_api_repr_base(self):
7474 ec .autodetect = True
7575 ec .ignore_unknown_values = False
7676 ec .compression = "compression"
77+ ec .connection_id = "path/to/connection"
7778 ec .schema = [schema .SchemaField ("full_name" , "STRING" , mode = "REQUIRED" )]
7879
7980 exp_schema = {
@@ -87,10 +88,17 @@ def test_to_api_repr_base(self):
8788 "autodetect" : True ,
8889 "ignoreUnknownValues" : False ,
8990 "compression" : "compression" ,
91+ "connectionId" : "path/to/connection" ,
9092 "schema" : exp_schema ,
9193 }
9294 self .assertEqual (got_resource , exp_resource )
9395
96+ def test_connection_id (self ):
97+ ec = external_config .ExternalConfig ("" )
98+ self .assertIsNone (ec .connection_id )
99+ ec .connection_id = "path/to/connection"
100+ self .assertEqual (ec .connection_id , "path/to/connection" )
101+
94102 def test_schema_None (self ):
95103 ec = external_config .ExternalConfig ("" )
96104 ec .schema = None
You can’t perform that action at this time.
0 commit comments