dtle icon indicating copy to clipboard operation
dtle copied to clipboard

kafka full replication job column type year(4): default value type should be int

Open asiroliu opened this issue 4 years ago • 0 comments

Description

kafka full replication job column type year(4): default value type should be int

Steps to reproduce the issue

  1. create db and table
create database action_db;
use action_db

create table year4_columns(id int(11) not null primary key,c_year year(4) DEFAULT 2019)ENGINE=InnoDB DEFAULT CHARSET=utf8;
  1. create kafka job
{
  "Name": "column_types_default_full_year4_columns",
  "Datacenters": [
    "dc1"
  ],
  "Tasks": [
    {
      "Type": "Src",
      "Driver": "MySQL",
      "NodeId": "da1c766d-b945-9ad4-a434-458d637f4420",
      "Config": {
        "ConnectionConfig": {
          "Host": "172.100.9.2",
          "Port": 3306,
          "User": "test_src",
          "Password": "test_src"
        },
        "ReplicateDoDb": [
          {
            "TableSchema": "action_db",
            "Tables": [
              {
                "TableName": "year4_columns"
              }
            ]
          }
        ]
      }
    },
    {
      "Type": "Dest",
      "Driver": "Kafka",
      "NodeId": "8db2080b-2753-9ce6-a264-45d3383ef35a",
      "Config": {
        "Topic": "dtle",
        "Brokers": [
          "172.100.9.21:9092"
        ],
        "Converter": "json"
      }
    }
  ]
}
  1. insert some data
use action_db
insert into year4_columns values (0,1901);
insert into year4_columns values (1,2155);
insert into year4_columns values (2,'00');
insert into year4_columns values (3,NULL);
insert into year4_columns values (4,default);
  1. get message from kafka
/kafka/bin/kafka-console-consumer.sh --bootstrap-server 172.100.9.21:9092 --from-beginning --property print.key=true --topic dtle.action_db.year4_columns

Describe the results you received

image

Describe the results you expected

Output of ./dtle version:**

NOMAD_VERSION=<0.11.1>
DTLE_VERSION=<9.9.9.9-master-f8a8a93>

Additional information

(e.g. issue happens only occasionally)

Additional details (log, config, job config etc):

asiroliu avatar Oct 19 '20 05:10 asiroliu