question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Type: Bug Not Streaming Null Values

See original GitHub issue

Bigquery insertAll operation is checking for a field in the inserted Row which is not present in the schema. I have set setIgnoreUnknownValues to true and also set setSkipInvalidRows to true.

Here is the exception Trace,

java.lang.NullPointerException: null value in entry: xyz=null
    at com.google.common.collect.CollectPreconditions.checkEntryNotNull(CollectPreconditions.java:33) ~[bqstream.jar:?]
    at com.google.common.collect.RegularImmutableMap.fromEntryArray(RegularImmutableMap.java:69) ~[bqstream.jar:?]
    at com.google.common.collect.RegularImmutableMap.fromEntries(RegularImmutableMap.java:46) ~[bqstream.jar:?]
    at com.google.common.collect.ImmutableMap.copyOf(ImmutableMap.java:354) ~[bqstream.jar:?]
    at com.google.common.collect.ImmutableMap.copyOf(ImmutableMap.java:327) ~[bqstream.jar:?]
    at com.google.cloud.bigquery.InsertAllRequest$RowToInsert.<init>(InsertAllRequest.java:81) ~[bqstream.jar:?]
    at com.google.cloud.bigquery.InsertAllRequest$RowToInsert.of(InsertAllRequest.java:141) ~[bqstream.jar:?]
    at com.XXXXXXXXXX.bqstream.data.Data.lambda$getData$0(Data.java:46) ~[bqstream.jar:?]
    at java.util.ArrayList.forEach(Unknown Source) ~[?:1.8.0_141]
    at com.XXXXXXXXXX.bqstream.data.Data.getData(Data.java:34) [bqstream.jar:?]
    at com.XXXXXXXXXX.bqstream.BatchProcessor.apply(BatchProcessor.java:22) [bqstream.jar:?]
    at com.XXXXXXXXXX.mdaolib.controller.BatchOutHandler.run(BatchOutHandler.java:35) [bqstream.jar:?]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_141]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_141]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_141]

After looking at the code for InsertAll, it seems like some Preconditons call is performed on the row to be inserted. But why is the same performed on a data not provided in the Schema.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
pongadcommented, Jul 24, 2018

@surabhikannan which version of BigQuery are you using? I believe this should have been fixed by #2798.

0reactions
surabhikannancommented, Jul 24, 2018

@pongad I am using v0.22.0, also thanks I was able to solve this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Value of 'null' is not valid for 'stream' in Fiddler | Telerik Forums
I have Fiddler installed on my local computer. I'm trying to troubleshoot an error on a server. I ran Fiddler on the server,...
Read more >
NullPointerException in Collectors.toMap with null entry values
You can work around this known bug in OpenJDK with this: Map<Integer, Boolean> collect = list.stream() .collect(HashMap::new, (m,v)->m.put(v.getId(), v.
Read more >
Solved: GeoEvent 10.9.1 inappropriate type for attribute e...
1 inappropriate type for attribute error on empty values. I've upgraded our ArcGIS Enterprise with GeoEvent 10.7. 1 to 10.9.
Read more >
Optional.orElse() doesn't accept null argument when ... - Bugs
java shows the problem The documentation for Optional.orElse() explicitly allows code to pass a null value as the argument, which will cause null...
Read more >
Bug descriptions — spotbugs 4.7.3 documentation
A method that returns either Boolean.TRUE, Boolean.FALSE or null is an accident waiting to happen. This method can be invoked as though it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found