Skip to content

Commit 021a5be

Browse files
authored
Add support for BigQuery storage_project_id (#2490)
1 parent 158bc9d commit 021a5be

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

soda-bigquery/src/soda_bigquery/common/data_sources/bigquery_data_source_connection.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
class BigQueryConnectionProperties(DataSourceConnectionProperties, ABC):
2929
project_id: Optional[str] = Field(None, description="BigQuery project ID")
30+
storage_project_id: Optional[str] = Field(None, description="BigQuery storage project ID")
3031
location: Optional[str] = Field(None, description="BigQuery location")
3132
client_options: Optional[dict] = Field(None, description="Client options")
3233
labels: Optional[dict] = Field({}, description="Labels")
@@ -117,6 +118,10 @@ def _apply_optional_params(self, config: BigQueryConnectionProperties):
117118
self.location = config.location
118119
self.client_options = config.client_options
119120

121+
# Storage project ID is currently not used, because the project is configured via the DQN in the data contract.
122+
# When we implement discovery, we'll need to use this value.
123+
self.storage_project_id = config.storage_project_id if config.storage_project_id else self.project_id
124+
120125
self.labels = config.labels
121126

122127
def _create_connection(

0 commit comments

Comments
 (0)