Error creating mapping relationship for table field ‘time’ type in cdcsource task creation,string to time(0)
Search before asking
- [X] I had searched in the issues and found no similar issues.
What happened
mysql源表创建时字段使用了time类型,创建任务时报错,query schema使用的是string,而sink创建的时候是time(0),导致任务无法提交。
What you expected to happen
Query schema: [id: STRING, customer_id: STRING, name: STRING, mobile_no: STRING, id_card: STRING, id_card_pic1: STRING, id_card_pic2: STRING, station: STRING, station_code: STRING, service_date: DATE, time_from: STRING, time_to: STRING, time_range: STRING, state: INT, response: STRING, rating: INT, reward: INT, operator_name: STRING, operator_id: STRING, cancel_flag: INT, hide_flag: INT, del_flag: BOOLEAN, creator: STRING, create_time: TIMESTAMP(9), modifier: STRING, modify_time: TIMESTAMP(9), delete_time: TIMESTAMP(9)] Sink schema: [id: STRING, customer_id: STRING, name: STRING, mobile_no: STRING, id_card: STRING, id_card_pic1: STRING, id_card_pic2: STRING, station: STRING, station_code: STRING, service_date: DATE, time_from: TIME(0), time_to: TIME(0), time_range: STRING, state: INT, response: STRING, rating: INT, reward: INT, operator_name: STRING, operator_id: STRING, cancel_flag: INT, hide_flag: INT, del_flag: BOOLEAN, creator: STRING, create_time: TIMESTAMP(6), modifier: STRING, modify_time: TIMESTAMP(6), delete_time: TIMESTAMP(6)] org.apache.flink.table.api.ValidationException: Column types of query result and sink for 'default_catalog.default_database.xxxxxxxxx' do not match. Cause: Incompatible types for sink column 'time_from' at position 10.
How to reproduce
Query schema: [id: STRING, customer_id: STRING, name: STRING, mobile_no: STRING, id_card: STRING, id_card_pic1: STRING, id_card_pic2: STRING, station: STRING, station_code: STRING, service_date: DATE, time_from: STRING, time_to: STRING, time_range: STRING, state: INT, response: STRING, rating: INT, reward: INT, operator_name: STRING, operator_id: STRING, cancel_flag: INT, hide_flag: INT, del_flag: BOOLEAN, creator: STRING, create_time: TIMESTAMP(9), modifier: STRING, modify_time: TIMESTAMP(9), delete_time: TIMESTAMP(9)] Sink schema: [id: STRING, customer_id: STRING, name: STRING, mobile_no: STRING, id_card: STRING, id_card_pic1: STRING, id_card_pic2: STRING, station: STRING, station_code: STRING, service_date: DATE, time_from: TIME(0), time_to: TIME(0), time_range: STRING, state: INT, response: STRING, rating: INT, reward: INT, operator_name: STRING, operator_id: STRING, cancel_flag: INT, hide_flag: INT, del_flag: BOOLEAN, creator: STRING, create_time: TIMESTAMP(6), modifier: STRING, modify_time: TIMESTAMP(6), delete_time: TIMESTAMP(6)] org.apache.flink.table.api.ValidationException: Column types of query result and sink for 'default_catalog.default_database.xxxxxxxxx' do not match. Cause: Incompatible types for sink column 'time_from' at position 10.
Anything else
Query schema: [id: STRING, customer_id: STRING, name: STRING, mobile_no: STRING, id_card: STRING, id_card_pic1: STRING, id_card_pic2: STRING, station: STRING, station_code: STRING, service_date: DATE, time_from: STRING, time_to: STRING, time_range: STRING, state: INT, response: STRING, rating: INT, reward: INT, operator_name: STRING, operator_id: STRING, cancel_flag: INT, hide_flag: INT, del_flag: BOOLEAN, creator: STRING, create_time: TIMESTAMP(9), modifier: STRING, modify_time: TIMESTAMP(9), delete_time: TIMESTAMP(9)] Sink schema: [id: STRING, customer_id: STRING, name: STRING, mobile_no: STRING, id_card: STRING, id_card_pic1: STRING, id_card_pic2: STRING, station: STRING, station_code: STRING, service_date: DATE, time_from: TIME(0), time_to: TIME(0), time_range: STRING, state: INT, response: STRING, rating: INT, reward: INT, operator_name: STRING, operator_id: STRING, cancel_flag: INT, hide_flag: INT, del_flag: BOOLEAN, creator: STRING, create_time: TIMESTAMP(6), modifier: STRING, modify_time: TIMESTAMP(6), delete_time: TIMESTAMP(6)] org.apache.flink.table.api.ValidationException: Column types of query result and sink for 'default_catalog.default_database.xxxxxxxxx' do not match. Cause: Incompatible types for sink column 'time_from' at position 10.
Version
1.0.0
Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
补充一下,是在整库同步的时候出现的
What is your Dinky version?
What is your Dinky version?
v1.0.0_rc3_flink_1.18
What is your Dinky version?
这个bug是否有解决呢?下载了最新的v1.0.0_rc4 问题依然存在
Hello @, this issue has not been active for more than 30 days. This issue will be closed in 7 days if there is no response. If you have any questions, you can comment and reply.
你好 @, 这个 issue 30 天内没有活跃,7 天后将关闭,如需回复,可以评论回复。
What is your Dinky version?
Has this bug been resolved?
What is your Dinky version?
Has this bug been resolved?
You can try to fix this problem
What is your Dinky version?
Has this bug been resolved?
You can try to fix this problem
how to fix it?