Bytes Format

直接使用byte[]类型,只支持1.10,强烈建议升级到1.12+用raw format,功能更加完善

用例

CREATE TABLE mysql_binlog (
 log BINARY
) WITH (
    'connector.type' = 'kafka',
    'connector.version' = 'universal',
    'connector.topic' = 'topic1',
    'connector.startup-mode' = 'latest-offset',
    'connector.properties.zookeeper.connect' = 'localhost:2281',
    'connector.properties.bootstrap.servers' = 'localhost:9292',
    'connector.properties.group.id' = 'test_json',
    'update-mode' = 'append',
    'format.type' = 'bytes'
);

create table print_table (
    log BINARY
) WITH (
    'connector.type' = 'kafka',
    'connector.version' = 'universal',
    'connector.topic' = 'topic2',
    'connector.startup-mode' = 'latest-offset',
    'connector.properties.zookeeper.connect' = 'localhost:2281',
    'connector.properties.bootstrap.servers' = 'localhost:9292',
    'connector.properties.group.id' = 'test_json',
    'update-mode' = 'append',
    'format.type' = 'bytes'
);

insert into print_table select * from mysql_binlog;