Wrangler service throws errors when connecting to BigQuery table with MONTH partition

Description

There are a few issues with Wrangler service connection to BQ primarily because we are using an older version of google-cloud-bigquery jar (1.110.1). These changes are already part of google-cloud-plugin - https://cdap.atlassian.net/browse/PLUGIN-475.

java.lang.IllegalArgumentException: Illegal Argument - Got unexpected time partitioning {"type":"MONTH"} in project XXX in dataset XXX in table part_type_month
at com.google.cloud.bigquery.StandardTableDefinition.fromPb(StandardTableDefinition.java:286) ~[google-cloud-bigquery-1.110.1.jar:1.110.1]
at com.google.cloud.bigquery.TableDefinition.fromPb(TableDefinition.java:159) ~[google-cloud-bigquery-1.110.1.jar:1.110.1]
at com.google.cloud.bigquery.TableInfo$BuilderImpl.<init>(TableInfo.java:195) ~[google-cloud-bigquery-1.110.1.jar:1.110.1]
at com.google.cloud.bigquery.Table.fromPb(Table.java:630) ~[google-cloud-bigquery-1.110.1.jar:1.110.1]
at com.google.cloud.bigquery.BigQueryImpl$21.apply(BigQueryImpl.java:847) ~[google-cloud-bigquery-1.110.1.jar:1.110.1]
at com.google.cloud.bigquery.BigQueryImpl$21.apply(BigQueryImpl.java:844) ~[google-cloud-bigquery-1.110.1.jar:1.110.1]
at com.google.common.collect.Iterators$7.transform(Iterators.java:750) ~[guava-20.0.jar:na]
at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:47) ~[guava-20.0.jar:na]
at com.google.cloud.PageImpl$PageIterator.computeNext(PageImpl.java:72) ~[google-cloud-core-1.93.4.jar:1.93.4]
at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:145) ~[guava-20.0.jar:na]
at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:140) ~[guava-20.0.jar:na]
at io.cdap.wrangler.service.bigquery.BigQueryHandler.lambda$listTables$2(BigQueryHandler.java:175) [expanded.16131010271344.3.0.a846bd6f-18d8-4564-86d2-37e96bd613be.jar/:na]
at io.cdap.wrangler.service.common.AbstractWranglerHandler.respond(AbstractWranglerHandler.java:200) ~[expanded.16131010271344.3.0.a846bd6f-18d8-4564-86d2-37e96bd613be.jar/:na]
at io.cdap.wrangler.service.bigquery.BigQueryHandler.listTables(BigQueryHandler.java:165) [expanded.16131010271344.3.0.a846bd6f-18d8-4564-86d2-37e96bd613be.jar/:na]
at io.cdap.wrangler.service.bigquery.BigQueryHandler316638576cdb1a6bdac09b3cd8770bf5.lambda$listTables_Lio_cdap_cdap_api_service_http_HttpServiceRequest_Lio_cdap_cdap_api_service_http_HttpServiceResponder_Ljava_lang_String_Ljava_lang_String_Ljava_lang_String__V(Unknown Source) [na:na]
at io.cdap.cdap.internal.app.runtime.AbstractContext.execute(AbstractContext.java:584) ~[na:na]
at io.cdap.cdap.internal.app.services.ServiceHttpServer$HandlerDelegatorContext$1.execute(ServiceHttpServer.java:216) ~[na:na]
at io.cdap.cdap.internal.app.runtime.service.http.AbstractHttpHandlerDelegator.execute(AbstractHttpHandlerDelegator.java:66) ~[na:na]
at io.cdap.wrangler.service.bigquery.BigQueryHandler316638576cdb1a6bdac09b3cd8770bf5.listTables(Unknown Source) [na:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_275]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_275]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_275]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_275]
at io.cdap.http.internal.HttpMethodInfo.invoke(HttpMethodInfo.java:87) ~[io.cdap.http.netty-http-1.5.0.jar:na]
at io.cdap.http.internal.HttpDispatcher.channelRead(HttpDispatcher.java:45) ~[io.cdap.http.netty-http-1.5.0.jar:na]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[io.netty.netty-all-4.1.16.Final.jar:4.1.16.Final]
at io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:38) ~[io.netty.netty-all-4.1.16.Final.jar:4.1.16.Final]
at io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:353) ~[io.netty.netty-all-4.1.16.Final.jar:4.1.16.Final]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) ~[io.netty.netty-all-4.1.16.Final.jar:4.1.16.Final]
at io.cdap.http.internal.NonStickyEventExecutorGroup$NonStickyOrderedEventExecutor.run(NonStickyEventExecutorGroup.java:254) ~[io.cdap.http.netty-http-1.5.0.jar:na]
at io.netty.util.concurrent.UnorderedThreadPoolEventExecutor$NonNotifyRunnable.run(UnorderedThreadPoolEventExecutor.java:277) ~[io.netty.netty-all-4.1.16.Final.jar:4.1.16.Final]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_275]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_275]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) ~[na:1.8.0_275]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[na:1.8.0_275]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_275]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_275]
at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_275]
Caused by: java.lang.IllegalArgumentException: No enum constant com.google.cloud.bigquery.TimePartitioning.Type.MONTH
at java.lang.Enum.valueOf(Enum.java:238) ~[na:1.8.0_275]
at com.google.cloud.bigquery.TimePartitioning$Type.valueOf(TimePartitioning.java:43) ~[google-cloud-bigquery-1.110.1.jar:1.110.1]
at com.google.cloud.bigquery.TimePartitioning.fromPb(TimePartitioning.java:145) ~[google-cloud-bigquery-1.110.1.jar:1.110.1]
at com.google.cloud.bigquery.StandardTableDefinition.fromPb(StandardTableDefinition.java:276) ~[google-cloud-bigquery-1.110.1.jar:1.110.1]
... 37 common frames omitted

Release Notes

None

Assignee

Bhooshan Mogal

Reporter

Greeshma Swaminathan

Labels

Dev Complete Date

None

Publish Date

None

Reviewer

None

Sprint

Cirus Sprint 6

Priority

Major