从外部MySQL数据表创建内部表失败,MySQL数据表所有字段类型都是varchar。
执行语句:create table table_a
as select * from mysql
.test
.table_b
;
报错信息:The olap table first column could nut be float, double, string, or array, struct, map, please use decimal or varchar instead.
创建catalog语句:create catalog mysql
properties (
"user"="root",
"type"="jdbc",
"password"="xxxxxx",
"jdbc_url"="jdbc:mysql://192.168.1.10:3306",
"driver_url"="mysql-connector-java-8.0.23.jar",
"driver_class"="com.mysql.cj.jdbc.Driver");
MySQL建表语句:create table table_b
(
uuid
varchar(255) not null,
name
varchar(255) not null
) engine=InnoDB default charset=utf8;
MySQL版本:5.5.68-MariaDB