Failure when replicating tables with DATE field type
When attempting to replicate a table with a DATE type field, the type is not found in the Field.Type enum. Assuming missing support for the newer Standard SQL datatypes in the version of BigQuery library:
exception #error {
:cause No enum constant com.google.cloud.bigquery.Field.Type.Value.DATE
:via
[{:type java.lang.IllegalArgumentException
:message No enum constant com.google.cloud.bigquery.Field.Type.Value.DATE
:at [java.lang.Enum valueOf Enum.java 238]}]
:trace
[[java.lang.Enum valueOf Enum.java 238]
[com.google.cloud.bigquery.Field$Type$Value valueOf Field.java 75]
[com.google.cloud.bigquery.Field fromPb Field.java 368]
[com.google.cloud.bigquery.Field$1 apply Field.java 46]
[com.google.cloud.bigquery.Field$1 apply Field.java 43]
[com.google.common.collect.Lists$TransformingRandomAccessList$1 transform Lists.java 640]
[com.google.common.collect.TransformedIterator next TransformedIterator.java 48]
[java.util.AbstractCollection toArray AbstractCollection.java 141]
[java.util.ArrayList <init> ArrayList.java 177]
[com.google.common.collect.Lists newArrayList Lists.java 146]
[com.google.cloud.bigquery.Schema$Builder fields Schema.java 78]
[com.google.cloud.bigquery.Schema of Schema.java 151]
[com.google.cloud.bigquery.Schema fromPb Schema.java 159]
[com.google.cloud.bigquery.TableDefinition$Builder <init> TableDefinition.java 88]
[com.google.cloud.bigquery.StandardTableDefinition$Builder <init> StandardTableDefinition.java 140]
[com.google.cloud.bigquery.StandardTableDefinition$Builder <init> StandardTableDefinition.java 119]
[com.google.cloud.bigquery.StandardTableDefinition fromPb StandardTableDefinition.java 283]
[com.google.cloud.bigquery.TableDefinition fromPb TableDefinition.java 172]
[com.google.cloud.bigquery.TableInfo$BuilderImpl <init> TableInfo.java 157]
[com.google.cloud.bigquery.Table fromPb Table.java 348]
[com.google.cloud.bigquery.BigQueryImpl getTable BigQueryImpl.java 353]
[sun.reflect.GeneratedMethodAccessor18 invoke nil -1]
[sun.reflect.DelegatingMethodAccessorImpl invoke DelegatingMethodAccessorImpl.java 43]
[java.lang.reflect.Method invoke Method.java 498]
[clojure.lang.Reflector invokeMatchingMethod Reflector.java 93]
[clojure.lang.Reflector invokeInstanceMethod Reflector.java 28]
[gclouj.bigquery$table invokeStatic bigquery.clj 142]
[gclouj.bigquery$table invoke bigquery.clj 141]
[uswitch.big_replicate.sync$load_table invokeStatic sync.clj 92]
[uswitch.big_replicate.sync$load_table invoke sync.clj 91]
[uswitch.big_replicate.sync$progress$fn__7851 invoke sync.clj 129]
[uswitch.big_replicate.sync$progress invokeStatic sync.clj 129]
[uswitch.big_replicate.sync$progress invoke sync.clj 121]
[uswitch.big_replicate.sync$replicator_agent$fn__7855 invoke sync.clj 138]
[clojure.core.async$thread_call$fn__6122 invoke async.clj 439]
[clojure.lang.AFn run AFn.java 22]
[java.util.concurrent.ThreadPoolExecutor runWorker ThreadPoolExecutor.java 1142]
[java.util.concurrent.ThreadPoolExecutor$Worker run ThreadPoolExecutor.java 617]
[java.lang.Thread run Thread.java 745]]}
Interesting, yep looks that way. Will try to take a look tomorrow/later this week to fix (unless someone else jumps in first :).
Thanks for reporting.
On Tue, 21 Feb 2017 at 11:32, Az [email protected] wrote:
When attempting to replicate a table with a DATE type field, the type is not found in the Field.Type enum. Assuming missing support for the newer Standard SQL datatypes in the version of BigQuery library:
exception #error { :cause No enum constant com.google.cloud.bigquery.Field.Type.Value.DATE :via [{:type java.lang.IllegalArgumentException :message No enum constant com.google.cloud.bigquery.Field.Type.Value.DATE :at [java.lang.Enum valueOf Enum.java 238]}] :trace [[java.lang.Enum valueOf Enum.java 238] [com.google.cloud.bigquery.Field$Type$Value valueOf Field.java 75] [com.google.cloud.bigquery.Field fromPb Field.java 368] [com.google.cloud.bigquery.Field$1 apply Field.java 46] [com.google.cloud.bigquery.Field$1 apply Field.java 43] [com.google.common.collect.Lists$TransformingRandomAccessList$1 transform Lists.java 640] [com.google.common.collect.TransformedIterator next TransformedIterator.java 48] [java.util.AbstractCollection toArray AbstractCollection.java 141] [java.util.ArrayList
ArrayList.java 177] [com.google.common.collect.Lists newArrayList Lists.java 146] [com.google.cloud.bigquery.Schema$Builder fields Schema.java 78] [com.google.cloud.bigquery.Schema of Schema.java 151] [com.google.cloud.bigquery.Schema fromPb Schema.java 159] [com.google.cloud.bigquery.TableDefinition$Builder TableDefinition.java 88] [com.google.cloud.bigquery.StandardTableDefinition$Builder StandardTableDefinition.java 140] [com.google.cloud.bigquery.StandardTableDefinition$Builder StandardTableDefinition.java 119] [com.google.cloud.bigquery.StandardTableDefinition fromPb StandardTableDefinition.java 283] [com.google.cloud.bigquery.TableDefinition fromPb TableDefinition.java 172] [com.google.cloud.bigquery.TableInfo$BuilderImpl TableInfo.java 157] [com.google.cloud.bigquery.Table fromPb Table.java 348] [com.google.cloud.bigquery.BigQueryImpl getTable BigQueryImpl.java 353] [sun.reflect.GeneratedMethodAccessor18 invoke nil -1] [sun.reflect.DelegatingMethodAccessorImpl invoke DelegatingMethodAccessorImpl.java 43] [java.lang.reflect.Method invoke Method.java 498] [clojure.lang.Reflector invokeMatchingMethod Reflector.java 93] [clojure.lang.Reflector invokeInstanceMethod Reflector.java 28] [gclouj.bigquery$table invokeStatic bigquery.clj 142] [gclouj.bigquery$table invoke bigquery.clj 141] [uswitch.big_replicate.sync$load_table invokeStatic sync.clj 92] [uswitch.big_replicate.sync$load_table invoke sync.clj 91] [uswitch.big_replicate.sync$progress$fn__7851 invoke sync.clj 129] [uswitch.big_replicate.sync$progress invokeStatic sync.clj 129] [uswitch.big_replicate.sync$progress invoke sync.clj 121] [uswitch.big_replicate.sync$replicator_agent$fn__7855 invoke sync.clj 138] [clojure.core.async$thread_call$fn__6122 invoke async.clj 439] [clojure.lang.AFn run AFn.java 22] [java.util.concurrent.ThreadPoolExecutor runWorker ThreadPoolExecutor.java 1142] [java.util.concurrent.ThreadPoolExecutor$Worker run ThreadPoolExecutor.java 617] [java.lang.Thread run Thread.java 745]]} — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/uswitch/big-replicate/issues/8, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAEfub_R4ILOYye97vSf6pIPdFFb0aaks5restOgaJpZM4MHMx0 .