Skip to content

Commit

Permalink
Reformat bigquery_tools.py (#26622)
Browse files Browse the repository at this point in the history
  • Loading branch information
dopieralad committed May 30, 2023
1 parent e62f289 commit 77c2b02
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions sdks/python/apache_beam/io/gcp/bigquery_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1346,17 +1346,18 @@ def convert_row_to_dict(self, row, schema):

@staticmethod
def from_pipeline_options(pipeline_options: PipelineOptions):
return BigQueryWrapper(client=BigQueryWrapper._bigquery_client(pipeline_options))
return BigQueryWrapper(
client=BigQueryWrapper._bigquery_client(pipeline_options))

@staticmethod
def _bigquery_client(pipeline_options: PipelineOptions):
return bigquery.BigqueryV2(
http=get_new_http(),
credentials=auth.get_service_credentials(pipeline_options),
response_encoding='utf8',
additional_http_headers={
"user-agent": "apache-beam-%s" % apache_beam.__version__
})
http=get_new_http(),
credentials=auth.get_service_credentials(pipeline_options),
response_encoding='utf8',
additional_http_headers={
"user-agent": "apache-beam-%s" % apache_beam.__version__
})


class RowAsDictJsonCoder(coders.Coder):
Expand Down

0 comments on commit 77c2b02

Please # to comment.