Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedabu98 committed Feb 7, 2023
1 parent 8f3c260 commit dd07d3c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@
import org.apache.beam.sdk.schemas.transforms.TypedSchemaTransformProvider;
import org.apache.beam.sdk.transforms.MapElements;
import org.apache.beam.sdk.transforms.PTransform;
import org.apache.beam.sdk.values.PCollection;
import org.apache.beam.sdk.values.PCollection.IsBounded;
import org.apache.beam.sdk.values.PCollectionRowTuple;
import org.apache.beam.sdk.values.Row;
import org.apache.beam.sdk.values.TypeDescriptors;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Strings;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableMap;
Expand Down
2 changes: 1 addition & 1 deletion sdks/python/apache_beam/io/gcp/bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -2325,7 +2325,7 @@ class StorageWriteToBigQuery(PTransform):
result = (p
| 'Create items' >> beam.Create(items)
| 'Write data' >> StorageWriteToBigQuery(
table="project:dataset.table"))
table="project:dataset.table"))
_ = (result['failed_rows_with_errors']
| 'Format errors' >> beam.Map(
lambda e: "failed row id: %s, error: %s" %
Expand Down
4 changes: 2 additions & 2 deletions sdks/python/apache_beam/io/gcp/bigquery_write_it_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
import base64
import datetime
import logging
import secrets
import os
import secrets
import time
import unittest
from decimal import Decimal
Expand Down Expand Up @@ -586,7 +586,7 @@ def setUp(self):
self.project = self.test_pipeline.get_option('project')

self.bigquery_client = BigQueryWrapper()
self.dataset_id = '%s%s%d' % (
self.dataset_id = '%s%s%s' % (
self.BIGQUERY_DATASET, str(int(time.time())), secrets.token_hex(3))
self.bigquery_client.get_or_create_dataset(self.project, self.dataset_id)
_LOGGER.info(
Expand Down

0 comments on commit dd07d3c

Please sign in to comment.