I am trying to read the data from a Pubsub topic using Google dataflow SQL and getting "NullPointerException" error. Could anyone guide me on what I am doing wrong.
Below is the SQL query. I tried selecting few columns also. Same error is coming.
SELECT tr.* FROM pubsub.topic.`project-xxx`.county_timeranges as tr
Log from LogsExplorer
logger: "com.google.cloud.dataflow.sqllauncher.DataflowSqlLauncher"
message: "Error in SQL launcher"
exception: "java.lang.NullPointerException
at sun.reflect.annotation.TypeAnnotationParser.mapTypeAnnotations(TypeAnnotationParser.java:356)
at sun.reflect.annotation.AnnotatedTypeFactory$AnnotatedTypeBaseImpl.<init>(AnnotatedTypeFactory.java:139)
at sun.reflect.annotation.AnnotatedTypeFactory.buildAnnotatedType(AnnotatedTypeFactory.java:65)
at sun.reflect.annotation.TypeAnnotationParser.buildAnnotatedType(TypeAnnotationParser.java:79)
at java.lang.reflect.Executable.getAnnotatedReturnType0(Executable.java:633)
at java.lang.reflect.Method.getAnnotatedReturnType(Method.java:648)
at org.apache.beam.sdk.schemas.FieldValueTypeInformation.hasNullableReturnType(FieldValueTypeInformation.java:173)
at org.apache.beam.sdk.schemas.FieldValueTypeInformation.forGetter(FieldValueTypeInformation.java:132)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1380)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at org.apache.beam.sdk.schemas.AutoValueSchema$AbstractGetterTypeSupplier.get(AutoValueSchema.java:62)
at org.apache.beam.sdk.schemas.utils.FieldValueTypeSupplier.get(FieldValueTypeSupplier.java:43)
at org.apache.beam.sdk.schemas.utils.JavaBeanUtils.lambda$getFieldTypes$0(JavaBeanUtils.java:107)
at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
at org.apache.beam.sdk.schemas.utils.JavaBeanUtils.getFieldTypes(JavaBeanUtils.java:106)
at org.apache.beam.sdk.schemas.AutoValueSchema.fieldValueTypeInformations(AutoValueSchema.java:78)
at org.apache.beam.sdk.schemas.CachingFactory.create(CachingFactory.java:52)
at org.apache.beam.sdk.schemas.FromRowUsingCreator.fromRow(FromRowUsingCreator.java:78)
at org.apache.beam.sdk.schemas.FromRowUsingCreator.apply(FromRowUsingCreator.java:62)
at org.apache.beam.sdk.schemas.FromRowUsingCreator.apply(FromRowUsingCreator.java:45)
at org.apache.beam.sdk.io.gcp.pubsub.PubsubSchemaIOProvider$PubsubSchemaIO.<init>(PubsubSchemaIOProvider.java:176)
at org.apache.beam.sdk.io.gcp.pubsub.PubsubSchemaIOProvider$PubsubSchemaIO.<init>(PubsubSchemaIOProvider.java:165)
at org.apache.beam.sdk.io.gcp.pubsub.PubsubSchemaIOProvider.from(PubsubSchemaIOProvider.java:124)
at org.apache.beam.sdk.io.gcp.pubsub.PubsubSchemaIOProvider.from(PubsubSchemaIOProvider.java:91)
at org.apache.beam.sdk.extensions.sql.meta.provider.SchemaIOTableProviderWrapper.buildBeamSqlTable(SchemaIOTableProviderWrapper.java:72)
at org.apache.beam.sdk.extensions.sql.meta.provider.datacatalog.DataCatalogTableProvider.buildBeamSqlTable(DataCatalogTableProvider.java:123)
at org.apache.beam.sdk.extensions.sql.meta.provider.FullNameTableProvider$TableNameTrackingProvider.buildBeamSqlTable(FullNameTableProvider.java:163)
at org.apache.beam.sdk.extensions.sql.impl.BeamCalciteSchema.getTable(BeamCalciteSchema.java:110)
at org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.jdbc.SimpleCalciteSchema.getImplicitTable(SimpleCalciteSchema.java:83)
at org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.jdbc.CalciteSchema.getTable(CalciteSchema.java:289)
at org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.jdbc.CalciteSchema$SchemaPlusImpl.getTable(CalciteSchema.java:657)
at org.apache.beam.sdk.extensions.sql.zetasql.TableResolution.resolveCalciteTable(TableResolution.java:57)
at org.apache.beam.sdk.extensions.sql.zetasql.SqlAnalyzer.addTableToLeafCatalog(SqlAnalyzer.java:326)
at org.apache.beam.sdk.extensions.sql.zetasql.SqlAnalyzer.lambda$createPopulatedCatalog$1(SqlAnalyzer.java:216)
at com.google.common.collect.ImmutableList.forEach(ImmutableList.java:407)
at org.apache.beam.sdk.extensions.sql.zetasql.SqlAnalyzer.createPopulatedCatalog(SqlAnalyzer.java:216)
at org.apache.beam.sdk.extensions.sql.zetasql.ZetaSQLPlannerImpl.rel(ZetaSQLPlannerImpl.java:98)
at org.apache.beam.sdk.extensions.sql.zetasql.ZetaSQLQueryPlanner.convertToBeamRelInternal(ZetaSQLQueryPlanner.java:168)
at org.apache.beam.sdk.extensions.sql.zetasql.ZetaSQLQueryPlanner.convertToBeamRel(ZetaSQLQueryPlanner.java:156)
at org.apache.beam.sdk.extensions.sql.impl.BeamSqlEnv.parseQuery(BeamSqlEnv.java:110)
at org.apache.beam.sdk.extensions.sql.SqlTransform.expand(SqlTransform.java:135)
at org.apache.beam.sdk.extensions.sql.SqlTransform.expand(SqlTransform.java:86)
at org.apache.beam.sdk.Pipeline.applyInternal(Pipeline.java:542)
at org.apache.beam.sdk.Pipeline.applyTransform(Pipeline.java:493)
at org.apache.beam.sdk.values.PBegin.apply(PBegin.java:56)
at org.apache.beam.sdk.Pipeline.apply(Pipeline.java:186)
at com.google.cloud.dataflow.sqllauncher.DataflowSqlLauncher.buildPipelineOrThrow(DataflowSqlLauncher.java:177)
at com.google.cloud.dataflow.sqllauncher.DataflowSqlLauncher.buildPipeline(DataflowSqlLauncher.java:114)
at com.google.cloud.dataflow.sqllauncher.DataflowSqlLauncher.buildAndRunPipeline(DataflowSqlLauncher.java:105)
at com.google.cloud.dataflow.sqllauncher.DataflowSqlLauncher.main(DataflowSqlLauncher.java:73)