You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/05/16 02:09:46 UTC

[GitHub] [incubator-doris] JNSimba commented on issue #9573: [Feature] The binlog load problem of Doris binlog load or Flink CDC

JNSimba commented on issue #9573:
URL: https://github.com/apache/incubator-doris/issues/9573#issuecomment-1127141216

   > 3.flink-cdc读取mysql到doris的flinksql中间添加字段也不支持date和datetime的添加
   
   flink sql maybe error,like this it worked
   
   
   ```sql
   
   -- mysql table
   CREATE TABLE test3(id int primary key,created_at bigint)
   
   
   -- doris table
   CREATE TABLE `test_sink` (
     id int  ,
     dt date,
     created_at bigint 
   )
   unique key(id)
   distributed by hash(id) buckets 1
   properties(
   "replication_allocation" = "tag.location.default: 1"
   )
   
   -- flink mysql schema
   CREATE TABLE mysql_record (
   id bigint,
   created_at bigint ,
   primary key(id) NOT ENFORCED
   ) WITH (
   'connector' = 'mysql-cdc',
   'hostname' = '127.0.0.1',
   'port' = '3306',
   'username' = 'root',
   'password' = 'Root123@',
   'database-name' = 'test',
   'table-name' = 'test3'
   )
   
   
   -- flink doris schema
   CREATE TABLE doris_record (
   id bigint,
   dt String,
   created_at bigint
   )
   WITH (
   'connector' = 'doris',
   'fenodes' = '127.0.0.1:8030',
   'table.identifier' = 'test.test_sink',
   'sink.batch.size' = '1',
   'username' = 'root',
   'password' = ''
   );
   
   
   -- flink sql
   insert into doris_record
   select id, FROM_UNIXTIME(created_at,'yyyy-MM-dd') as dt,created_at from mysql_record;
   
   
   ```
   
   
   
   
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org