赞
踩
在使用flinkTableAPI开发的时候,执行SQL,使用insert overwrite时,提示DynamicTableSink of table 'default_catalog.default_database.xx' implements the SupportsOverwrite interface.
这时我们需要在pom.xml文件中添加如下依赖,就可以解决:
<dependency> <groupId>org.apache.flink</groupId> <artifactId>flink-connector-jdbc_2.11</artifactId> <version>1.13.2</version> </dependency>
- org.apache.flink.table.api.ValidationException: INSERT OVERWRITE requires that the underlying DynamicTableSink of table 'default_catalog.default_database.xx' implements the SupportsOverwrite interface.
- at org.apache.flink.table.planner.connectors.DynamicSinkUtils.validateAndApplyOverwrite(DynamicSinkUtils.java:494)
- at org.apache.flink.table.planner.connectors.DynamicSinkUtils.prepareDynamicSink(DynamicSinkUtils.java:376)
- at org.apache.flink.table.planner.connectors.DynamicSinkUtils.convertSinkToRel(DynamicSinkUtils.java:191)
- at org.apache.flink.table.planner.connectors.DynamicSinkUtils.convertSinkToRel(DynamicSinkUtils.java:163)
- at org.apache.flink.table.planner.delegation.PlannerBase$$anonfun$2.apply(PlannerBase.scala:229)
- at org.apache.flink.table.planner.delegation.PlannerBase$$anonfun$2.apply(PlannerBase.scala:201)
- at scala.Option.map(Option.scala:146)
- at org.apache.flink.table.planner.delegation.PlannerBase.translateToRel(PlannerBase.scala:201)
- at org.apache.flink.table.planner.delegation.PlannerBase$$anonfun$1.apply(PlannerBase.scala:162)
- at org.apache.flink.table.planner.delegation.PlannerBase$$anonfun$1.apply(PlannerBase.scala:162)
- 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:162)
- at org.apache.flink.table.api.internal.TableEnvironmentImpl.translate(TableEnvironmentImpl.java:1518)
- at org.apache.flink.table.api.internal.TableEnvironmentImpl.executeInternal(TableEnvironmentImpl.java:740)
- at org.apache.flink.table.api.internal.TableEnvironmentImpl.executeInternal(TableEnvironmentImpl.java:856)
- at org.apache.flink.table.api.internal.TableEnvironmentImpl.executeSql(TableEnvironmentImpl.java:730)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。