1

在我的 kafka 金门大数据中。当我尝试更新记录时,我只在 json 文件的部分之后获得更新的列和主键列

{"table":"MYSCHEMATOPIC.PASSPORTS","op_type":"U","op_ts":"2018-03-17 13:57:50.000000","current_ts":"2018-03-17T13:57:53.901000","pos":"00000000030000010627","before":{"PASSPORT_ID":71541893,"PPS_ID":71541892,"PASSPORT_NO":"1234567","PASSPORT_NO_NUMERIC":241742,"PASSPORT_TYPE_ID":7,"ISSUE_DATE":null,"EXPIRY_DATE":"0060-12-21 00:00:00","ISSUE_PLACE_EN":"UN-DEFINED","ISSUE_PLACE_AR":"?????? ????????","ISSUE_COUNTRY_ID":203,"ISSUE_GOV_COUNTRY_ID":203,"IS_ACTIVE":1,"PREV_PASSPORT_ID":null,"CREATED_DATE":"2003-06-08 00:00:00","CREATED_BY":-9,"MODIFIED_DATE":null,"MODIFIED_BY":null,"IS_SETTLED":0,"MAIN_PASSPORT_PERSON_INFO_ID":34834317,"NATIONALITY_ID":590},
"after":{"PASSPORT_ID":71541893,"NATIONALITY_ID":589}}

在我的 json 部分之后,我想显示所有列

如何在之后的部分中获取所有列?

gg.handlerlist = kafkahandler
gg.handler.kafkahandler.type=kafka gg.handler.kafkahandler.KafkaProducerConfigFile=custom_kafka_producer.properties
    #The following resolves the topic name using the short table name
    gg.handler.kafkahandler.topicMappingTemplate=passports

    gg.handler.kafkahandler.format=json
    gg.handler.kafkahandler.BlockingSend =false
    gg.handler.kafkahandler.includeTokens=false
    gg.handler.kafkahandler.mode=op
    #gg.handler.kafkahandler.format.insertOpKey=I
    #gg.handler.kafkahandler.format.updateOpKey=U
    #gg.handler.kafkahandler.format.deleteOpKey=D
    #gg.handler.kafkahandler.format.truncateOpKey=T
    #gg.handler.kafkahandler.format.includeColumnNames=TRUE
    goldengate.userexit.timestamp=utc
    goldengate.userexit.writers=javawriter
    javawriter.stats.display=TRUE
    javawriter.stats.full=TRUE
    gg.log=log4j
    gg.log.level=info
  gg.report.time=30sec
4

2 回答 2

1

尝试改用Kafka Connect 处理程序- 这包括完整的有效负载。本文介绍了设置过程。

于 2018-03-19T09:39:39.073 回答
0

嗨 这个问题是通过在金门侧添加下面的变化来解决的

添加 TRANDATA 表名 ALLCOLS

于 2020-02-14T06:50:01.840 回答