Skip to content

Commit

Permalink
Fix precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
pabloem committed Oct 24, 2020
1 parent 325c573 commit 9bd0881
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions sdks/python/apache_beam/io/gcp/bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,11 @@ def compute_table_name(row):
from apache_beam.utils.histogram import Histogram
from apache_beam.utils.histogram import LinearBucket

try:
from apache_beam.io.gcp.internal.clients.bigquery import TableReference
except ImportError:
TableReference = None

__all__ = [
'TableRowJsonCoder',
'BigQueryDisposition',
Expand Down Expand Up @@ -1602,7 +1607,7 @@ def _compute_method(self, experiments, is_streaming_pipeline):
def expand(self, pcoll):
p = pcoll.pipeline

if (isinstance(self.table_reference, bigquery.TableReference) and
if (isinstance(self.table_reference, TableReference) and
self.table_reference.projectId is None):
self.table_reference.projectId = pcoll.pipeline.options.view_as(
GoogleCloudOptions).project
Expand Down Expand Up @@ -1955,7 +1960,7 @@ def __init__(
self,
query: str = None,
use_standard_sql: bool = False,
table: Union[str, bigquery.TableReference] = None,
table: Union[str, TableReference] = None,
flatten_results: bool = False):
"""
Only one of query or table should be specified.
Expand Down

0 comments on commit 9bd0881

Please sign in to comment.