【详述】从 MySQL 实时同步-Flink写入StarRocks时报错
【背景】根据这个文档:https://docs.starrocks.io/zh-cn/latest/loading/Flink_cdc_load#同步库表结构
做到第3步时,MySQL报错“ERROR 1064 (HY000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘.’ at line 1”
SQL语句为:“CREATE DATABASE IF NOT EXISTS default_catalog
.inf_sys_db
;”
当只执行“CREATE DATABASE IF NOT EXISTS inf_sys_db
;”时执行成功无报错。
创建表时也是一样的错误。
整个sql文件内容如下:
CREATE DATABASE IF NOT EXISTS default_catalog
.inf_sys_db
;
CREATE TABLE IF NOT EXISTS default_catalog
.inf_sys_db
.user_src
(
id
BIGINT NOT NULL,
avatar
STRING NULL,
create_time
TIMESTAMP NULL,
email
STRING NULL,
enabled
BIGINT NULL,
password
STRING NULL,
username
STRING NULL,
last_password_reset_time
TIMESTAMP NULL,
dept_id
BIGINT NULL,
phone
STRING NULL,
job_num
STRING NULL,
expire_time
TIMESTAMP NULL,
real_name
STRING NULL,
is_dept_head
BOOLEAN NULL,
is_on_the_job
BOOLEAN NULL,
hire_date
TIMESTAMP NULL,
term_date
TIMESTAMP NULL,
handicapped
BOOLEAN NULL,
open_id
STRING NULL,
id_card_no
STRING NULL,
serial_number
STRING NULL,
mp_open_id
STRING NULL,
unionid
STRING NULL,
update_time
TIMESTAMP NULL,
dept
STRING NULL,
zentao_username
STRING NULL,
zentao_password
STRING NULL,
posts
STRING NULL,
technical
STRING NULL,
level
STRING NULL,
company_name
STRING NULL,
capacity_type
STRING NULL,
cost_center_code
STRING NULL,
cost_coefficient
DECIMAL(10, 2) NULL,
employee_status
STRING NULL,
job_place
STRING NULL,
sex
INT NULL,
one_level_class_code
STRING NULL,
one_level_class_name
STRING NULL,
applicant_id
STRING NULL,
insurance_city
STRING NULL,
PRIMARY KEY(id
)
NOT ENFORCED
) with (
‘connector’ = ‘mysql-cdc’,
‘hostname’ = ‘10.17.18.88’,
‘port’ = ‘3306’,
‘username’ = ‘user’,
‘password’ = ‘xxxxxxx’,
‘database-name’ = ‘inf_sys_db’,
‘table-name’ = ‘user’
);
【业务影响】
【StarRocks版本】例如:1.18.2
【集群规模】例如:3fe(1 follower+2observer)+5be(fe与be混部)
【机器信息】CPU虚拟核/内存/网卡,例如:48C/64G/万兆
【联系方式】为了在解决问题过程中能及时联系到您获取一些日志信息,请补充下您的联系方式,例如:社区群4-小李或者邮箱,谢谢
【附件】
- 慢查询:
- Profile信息,获取Profile,通过Profile分析查询瓶颈
- 并行度:show variables like ‘%parallel_fragment_exec_instance_num%’;
- pipeline是否开启:show variables like ‘%pipeline%’;
- be节点cpu和内存使用率截图
- 查询报错:
- query_dump,怎么获取query_dump文件
- be crash
- be.out