moon-fall opened a new issue #2679:
URL: https://github.com/apache/iceberg/issues/2679
error like this
Exception in thread "main" org.apache.flink.table.api.ValidationException:
Could not create a PRIMARY KEY '17bb7db3-e030-4639-ba8a-ff74f78649f6'. Column
'id' is nullable.
at
org.apache.flink.table.api.TableSchema.validatePrimaryKey(TableSchema.java:468)
at
org.apache.flink.table.api.TableSchema.access$200(TableSchema.java:59)
at
org.apache.flink.table.api.TableSchema$Builder.build(TableSchema.java:698)
at
org.apache.iceberg.flink.FlinkSchemaUtil.toSchema(FlinkSchemaUtil.java:173)
at
org.apache.iceberg.flink.FlinkCatalog.toCatalogTable(FlinkCatalog.java:535)
at org.apache.iceberg.flink.FlinkCatalog.getTable(FlinkCatalog.java:311)
at org.apache.iceberg.flink.FlinkCatalog.getTable(FlinkCatalog.java:90)
at
org.apache.flink.table.catalog.CatalogManager.getPermanentTable(CatalogManager.java:412)
at
org.apache.flink.table.catalog.CatalogManager.getTable(CatalogManager.java:378)
at
org.apache.flink.table.planner.delegation.PlannerBase.getTableSink(PlannerBase.scala:335)
at
org.apache.flink.table.planner.delegation.PlannerBase.translateToRel(PlannerBase.scala:220)
at
org.apache.flink.table.planner.delegation.PlannerBase$$anonfun$1.apply(PlannerBase.scala:164)
at
org.apache.flink.table.planner.delegation.PlannerBase$$anonfun$1.apply(PlannerBase.scala:164)
at
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
at
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
at scala.collection.Iterator$class.foreach(Iterator.scala:891)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1334)
at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:234)
at scala.collection.AbstractTraversable.map(Traversable.scala:104)
at
org.apache.flink.table.planner.delegation.PlannerBase.translate(PlannerBase.scala:164)
at
org.apache.flink.table.api.internal.TableEnvironmentImpl.translate(TableEnvironmentImpl.java:1329)
at
org.apache.flink.table.api.internal.TableEnvironmentImpl.executeInternal(TableEnvironmentImpl.java:676)
at
org.apache.flink.table.api.internal.TableEnvironmentImpl.executeOperation(TableEnvironmentImpl.java:767)
at
org.apache.flink.table.api.internal.TableEnvironmentImpl.executeSql(TableEnvironmentImpl.java:666)
at CdcToIceberg.main(CdcToIceberg.java:89)
i think it should set the identifierFieldIds not null when convert iceberg
schema to flink table schema
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]