Describe the bug
遇到Flinkx 同步数据到ClickHouse中,如果ClickHouse中某一列存在默认值表达式,比如日期时间 uuid等
会出错:
Caused by: java.lang.RuntimeException: no column default_expresseion in columns list database table name type default_type default_expression
at ru.yandex.clickhouse.response.ClickHouseResultSet.asColNum(ClickHouseResultSet.java:616)
at ru.yandex.clickhouse.response.ClickHouseResultSet.getString(ClickHouseResultSet.java:251)
at ru.yandex.clickhouse.ClickHouseDatabaseMetadata.getColumns(ClickHouseDatabaseMetadata.java:863)
at com.dtstack.flinkx.connector.jdbc.util.JdbcUtil.getTableMetaData(JdbcUtil.java:143)
at com.dtstack.flinkx.connector.jdbc.sink.JdbcOutputFormat.getTableMetaData(JdbcOutputFormat.java:135)
at com.dtstack.flinkx.connector.jdbc.sink.JdbcOutputFormat.initColumnList(JdbcOutputFormat.java:121)
at com.dtstack.flinkx.connector.jdbc.sink.JdbcOutputFormat.openInternal(JdbcOutputFormat.java:89)
at com.dtstack.flinkx.sink.format.BaseRichOutputFormat.open(BaseRichOutputFormat.java:216)
at com.dtstack.flinkx.sink.DtOutputFormatSinkFunction.open(DtOutputFormatSinkFunction.java:95)
at org.apache.flink.api.common.functions.util.FunctionUtils.openFunction(FunctionUtils.java:34)
at org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator.open(AbstractUdfStreamOperator.java:102)
at org.apache.flink.streaming.api.operators.StreamSink.open(StreamSink.java:46)
at org.apache.flink.streaming.runtime.tasks.OperatorChain.initializeStateAndOpenOperators(OperatorChain.java:428)
at org.apache.flink.streaming.runtime.tasks.StreamTask.lambda$beforeInvoke$2(StreamTask.java:543)
at org.apache.flink.streaming.runtime.tasks.StreamTaskActionExecutor$SynchronizedStreamTaskActionExecutor.runThrowing(StreamTaskActionExecutor.java:93)
at org.apache.flink.streaming.runtime.tasks.StreamTask.beforeInvoke(StreamTask.java:533)
at org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:573)
at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:755)
at org.apache.flink.runtime.taskmanager.Task.run(Task.java:570)
at java.lang.Thread.run(Thread.java:748)
Expected behavior
如何解决呢?
Screenshots
If applicable, add screenshots to help explain your problem.
Describe the bug 遇到Flinkx 同步数据到ClickHouse中,如果ClickHouse中某一列存在默认值表达式,比如日期时间 uuid等 会出错: Caused by: java.lang.RuntimeException: no column default_expresseion in columns list database table name type default_type default_expression at ru.yandex.clickhouse.response.ClickHouseResultSet.asColNum(ClickHouseResultSet.java:616) at ru.yandex.clickhouse.response.ClickHouseResultSet.getString(ClickHouseResultSet.java:251) at ru.yandex.clickhouse.ClickHouseDatabaseMetadata.getColumns(ClickHouseDatabaseMetadata.java:863) at com.dtstack.flinkx.connector.jdbc.util.JdbcUtil.getTableMetaData(JdbcUtil.java:143) at com.dtstack.flinkx.connector.jdbc.sink.JdbcOutputFormat.getTableMetaData(JdbcOutputFormat.java:135) at com.dtstack.flinkx.connector.jdbc.sink.JdbcOutputFormat.initColumnList(JdbcOutputFormat.java:121) at com.dtstack.flinkx.connector.jdbc.sink.JdbcOutputFormat.openInternal(JdbcOutputFormat.java:89) at com.dtstack.flinkx.sink.format.BaseRichOutputFormat.open(BaseRichOutputFormat.java:216) at com.dtstack.flinkx.sink.DtOutputFormatSinkFunction.open(DtOutputFormatSinkFunction.java:95) at org.apache.flink.api.common.functions.util.FunctionUtils.openFunction(FunctionUtils.java:34) at org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator.open(AbstractUdfStreamOperator.java:102) at org.apache.flink.streaming.api.operators.StreamSink.open(StreamSink.java:46) at org.apache.flink.streaming.runtime.tasks.OperatorChain.initializeStateAndOpenOperators(OperatorChain.java:428) at org.apache.flink.streaming.runtime.tasks.StreamTask.lambda$beforeInvoke$2(StreamTask.java:543) at org.apache.flink.streaming.runtime.tasks.StreamTaskActionExecutor$SynchronizedStreamTaskActionExecutor.runThrowing(StreamTaskActionExecutor.java:93) at org.apache.flink.streaming.runtime.tasks.StreamTask.beforeInvoke(StreamTask.java:533) at org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:573) at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:755) at org.apache.flink.runtime.taskmanager.Task.run(Task.java:570) at java.lang.Thread.run(Thread.java:748)
Expected behavior 如何解决呢?
Screenshots If applicable, add screenshots to help explain your problem.