Could not find any format factory for identifier ‘parquet‘ in the classpath

编写FlinkSQL读写hdfs上的parquet文件报错:

Caused by: org.apache.flink.table.api.ValidationException: Could not find any format factory for identifier 'parquet' in the classpath.

代码如下:

tEnv.executeSql("CREATE TABLE fs_table (\n" +
        "  id STRING,\n" +
        "  name STRING,\n" +
        "  age INT,\n" +
        "  `day` STRING\n" +
        ") PARTITIONED BY (`day`) WITH (\n" +
        "  'connector'='filesystem',\n" +
        "  'path'='hdfs://127.0.0.1:8020/user/hive/warehouse/test.db/test2/',\n" +
        "  'format'='parquet',\n" +
        "  'sink.partition-commit.delay'='1 h',\n" +
        "  'sink.partition-commit.policy.kind'='success-file'\n" +
        ")");

解决:添加flink-parquet依赖


    org.apache.flink
    flink-parquet_2.11
    ${flink.version}

你可能感兴趣的:(Flink,java,spring,mybatis)