beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (BEAM-2406) NullPointerException when writing an empty table to BigQuery
Date Mon, 05 Jun 2017 17:14:04 GMT

    [ https://issues.apache.org/jira/browse/BEAM-2406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16037228#comment-16037228
] 

ASF GitHub Bot commented on BEAM-2406:
--------------------------------------

Github user asfgit closed the pull request at:

    https://github.com/apache/beam/pull/3293


> NullPointerException when writing an empty table to BigQuery
> ------------------------------------------------------------
>
>                 Key: BEAM-2406
>                 URL: https://issues.apache.org/jira/browse/BEAM-2406
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-java-gcp
>    Affects Versions: 2.0.0
>            Reporter: Ben Chambers
>            Assignee: Reuven Lax
>            Priority: Minor
>
> Originally reported on Stackoverflow:
> https://stackoverflow.com/questions/44314030/handling-empty-pcollections-with-bigquery-in-apache-beam
> It looks like if there is no data to write, then WritePartitions will return a null destination,
as explicitly stated in the comments:
> https://github.com/apache/beam/blob/v2.0.0/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/WritePartition.java#L126
> But, the ConstantTableDestination doesn't turn that into the constant destination as
the comment promises, instead it returns that `null` destination:
> https://github.com/apache/beam/blob/53c9bf4cd325035fabde192c63652ef6d591b93c/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/DynamicDestinationsHelpers.java#L74
> This leads to a null pointer error here since the `tableDestination` is that null result
from calling `getTable`:
> https://github.com/apache/beam/blob/v2.0.0/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/WriteTables.java#L97



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message