You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-zh@flink.apache.org by Luna Wong <gf...@gmail.com> on 2021/01/11 12:56:25 UTC
Flink IDEA中使用Iceberg
代码如下,Flink metastore报错日志: AlreadyExistsException(message:Database
default already exists)
但是我已经 USE了 luna db啊?很奇怪
tEnv.executeSql("CREATE CATALOG iceberg_hive WITH (\n" +
" 'type'='iceberg',\n" +
" 'catalog-type'='hive',\n" +
" 'uri'='thrift://kudu1:9083',\n" +
" 'clients'='2',\n" +
" 'property-version'='1',\n" +
" 'warehouse'='hdfs://ns1//user/hive/warehouse'\n" +
")");
tEnv.executeSql("USE CATALOG iceberg_hive");
// tEnv.executeSql("CREATE DATABASE luna");
tEnv.executeSql("USE luna");
tEnv.executeSql("CREATE TABLE iceberg_hive.luna.dwd (\n" +
" id BIGINT COMMENT 'unique id',\n" +
" name STRING\n" +
")");
tEnv.executeSql("CREATE TABLE iceberg_hive.luna.ads (\n" +
" id BIGINT COMMENT 'unique id',\n" +
" name STRING\n" +
")");