Skip to content

Commit 6477527

Browse files
authored
DSS-3231 Add success return to gs_to_bq transfer method (#31)
This is because it can cause silent failures without it. There is a try-except (without a 'raise') within the load_table_from_uris method, so if there is an error in the BigQuery load job, the try-except causes it to appear as a success. Hence we can't then ascertain whether the job failed and raise an error accordingly. See JIRA ticket comment [here](https://timeoutgroup.atlassian.net/browse/DSS-3231?focusedCommentId=263012) for local testing of this method (using a copy of the transfer module)
1 parent 3a42448 commit 6477527

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

to_data_library/data/transfer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def gs_to_bq(self, gs_uris, table,
183183

184184
try:
185185
# Start the load job
186-
bq_client.load_table_from_uris(
186+
return bq_client.load_table_from_uris(
187187
gs_uris, table_ref, job_config=job_config
188188
)
189189

0 commit comments

Comments
 (0)