添加ifKeyValueCase参数 #20240617支持

  • ifKeyValueCase参数:控制keymap设置的value大小写(key的大小写,直接设置即可),0不变,1小写,2大写

  • zcbus_other(ColNameCase=2/ifKeyValueCase=2)

    {
      "keymap":{
          "loaderTime":"zcbus_loadertime",
          "send_type":"zcbus_send_type",
          "columntype":"zcbus_columntype",
          "startTime":"zcbus_starttime",
          "stopTime":"zcbus_stoptime",
          "optype":"zcbus_op_type",
          "db_type":"zcbus_db_type",
          "op_time":"zcbus_op_time",
          "db_name":"zcbus_db_name",
          "batchCode":"batchcode",
          "table_name":"zcbus_table_name",
          "insert_count":"insert_count",
          "update_count":"update_count",
          "delete_count":"delete_count",
          "ddl_count":"ddl_count",
          "schema_name":"ZCBUS_SCHEMA_NAME",
          "insertvalues":"after",
          "deletevalues":"before",
          "updatebefore":"before",
          "updateafter":"after",
          "primarykey":"primarykey",
          "records":"records",
          "oper_count":"oper_count",
          "sendDate":"senddate",
          "shardingKey":"shardingkey"
      },
      "opermap":{
          "fullload":"R",
          "insert":"I",
          "update":"U",
          "delete":"D",
          "ddl":"DDL",
          "real_check":"RC",
          "full_check":"FC"
      },
      "loaderTime":1,
      "rid":1,
      "useupdatemark":1,
      "sendtype":1,
      "ddl":0,
      "updatetodeleteandinsert":0,
      "ColNameCase":2,
      "ifIncludecolumnType":1,
      "ifIncludeprimaryKey":1,
      "ifIncludebatchCode":0,
      "ifIncludesendDate":1,
      "ifIncludeCheckBatchCode":0,
      "ifIncludeSharedingKey":1,
      "sendbatch":0,
      "real_check":1,
      "full_check":0,
      "module_check":"tel_check_v2",
      "ifddltodict":0,
      "ifIncludeCheckDateRange":0,
      "ifIncludeSend_type":0,
      "ifIncludeoptime":0,
      "ifIncludedbtype":1,
      "ifIncludeSchemaName":1,
      "ifSupplementUpdateAfter":1,
      "ifInclueUpdateBefore":0,
      "ifIncludeSourceHostPort":0,
      "ifIncludeShardingSchemaTable":0,
      "ifIncludeCheckZeroData":0,
      "ifIncludeoptime":1,
      "ifKeyValueCase":2,
      "skipddl":0,
      "jsontype":"simple_json"
    }

    测试demo结果:

{"zcbus_op_time":"2024-06-17 15:21:55","zcbus_op_type":"UPDATE","zcbus_table_name":"TEST","zcbus_db_type":1,"zcbus_loadertime":"2024-06-17 15:22:09","OP_TIME":"2024-06-17 15:21:55","ZCBUS_SCHEMA_NAME":"TEST","C1":"1122334455","C2":"test1111"}

{"zcbus_op_time":"2024-06-17 15:23:49","zcbus_op_type":"INSERT","zcbus_table_name":"TEST","zcbus_db_type":1,"zcbus_loadertime":"2024-06-17 15:24:01","OP_TIME":"2024-06-17 15:23:49","ZCBUS_SCHEMA_NAME":"TEST","C1":"66661111","C2":"testTEST"}

  • 补充DEMO,单独参考
{
    "keymap":{
        "loaderTime":"loadertime",
        "send_type":"send_type",
        "columntype":"columntype",
        "startTime":"starttime",
        "stopTime":"stoptime",
        "optype":"optype",
        "db_type":"db_type",
        "op_time":"op_time",
        "db_name":"db_name",
        "batchCode":"batchcode",
        "table_name":"table_name",
        "insert_count":"insert_count",
        "update_count":"update_count",
        "delete_count":"delete_count",
        "ddl_count":"ddl_count",
        "schema_name":"schema_name",
        "before":"before",
        "after":"after",
        "primarykey":"primarykey",
        "values":"values",
        "records":"records",
        "oper_count":"oper_count",
        "sendDate":"senddate",
        "shardingKey":"shardingkey"
    },
    "opermap":{
        "fullload":"R",
        "insert":"I",
        "update":"U",
        "delete":"D",
        "ddl":"DDL",
        "real_check":"RC",
        "full_check":"FC"
    },
    "loaderTime":1,
    "rid":1,
    "useupdatemark":1,
    "sendtype":1,
    "ddl":0,
    "updatetodeleteandinsert":0,
    "ColNameCase":1,
    "ifIncludecolumnType":1,
    "ifIncludeprimaryKey":1,
    "sendHeader":{
        "provcode":"fix:834",
        "srccode":"fix:MSS",
        "dataacct":"var:CURRENT_DATE(YYYYmmdd)",
        "batchnum":"var:NUM(2)",
        "filename":""
    },
    "ifIncludebatchCode":0,
    "ifIncludesendDate":1,
    "ifIncludeCheckBatchCode":0,
    "ifIncludeSharedingKey":1,
    "sendbatch":0,
    "real_check":1,
    "full_check":0,
    "module_check":"tel_check_v2",
    "ifddltodict":0,
    "ifIncludeCheckDateRange":0,
    "ifIncludeSend_type":0,
    "ifIncludeoptime":0,
    "ifIncludedbtype":1,
    "ifIncludeSchemaName":0,
    "ifSupplementUpdateAfter":1,
    "ifInclueUpdateBefore":0,
    "ifIncludeSourceHostPort":0,
    "ifIncludeShardingSchemaTable":0,
    "ifIncludeCheckZeroData":0,
    "skipddl":0,
    "jsontype":"json_module"
}
文档更新时间: 2024-06-16 22:54   作者:阿力