Flink??????1.10.0
??????BlinkPlanner??????????java??????????????CSV????????????proctime??????
??????????????
tableEnv.connect(new FileSystem()
.path("file:///Users/test/csv/demo.csv")
)
.withFormat(new Csv())
.withSchema(
new Schema()
.field("id", DataTypes.STRING())
.field("name", DataTypes.STRING())
.field("user_action_time",
DataTypes.TIMESTAMP(3)).proctime()
)
.registerTableSource("csv_table");
??????????????
Reason: No factory supports all properties.
The matching candidates:
org.apache.flink.table.sources.CsvBatchTableSourceFactory
Unsupported property keys:
schema.#.proctime
????????proctime??????????????????????DDL????????????????????
tableEnv.sqlUpdate("create table csv_table(" +
"id string," +
"name string," +
"user_action_time as
PROCTIME()" +
") with (" +
" 'connector.type' =
'filesystem'," +
" 'connector.path' =
'file:///Users/test/csv/demo.csv'," +
" 'format.type' =
'csv'" +
")");