【问题标题】:Convert XML to AVRO using convertRecord processor in NiFi使用 NiFi 中的 convertRecord 处理器将 XML 转换为 AVRO
【发布时间】:2019-07-15 09:10:31
【问题描述】:

我想使用 convertRecord 处理器将以下 XML 文件转换为 AVRO 格式。在这里我无法获取 AVRO 格式的属性值。

XML-

<book id="b002">
    <author>Brandon Sanderson</author>
    <title>Way of Kings</title>
    <genre>Fantasy</genre>
    <price>50</price>
    <pub_date>2006-12-17T09:30:47.0Z</pub_date>
    <sold>10</sold>
</book>

【问题讨论】:

  • 请提供convertRecord处理器的参数
  • 我能够通过将源定义为 AVRO 模式中的属性来获取属性值。 { "name" : "currency", "type" : [ "null", "string" ], "default" : null, "source" : "属性货币" }

标签: apache-nifi


【解决方案1】:

看来提问者已经找到了解决办法:

我能够通过在 AVRO 模式中将源定义为属性来获取属性值。 { "name" : "currency", "type" : [ "null", "string" ], "default" : null, "source" : "属性货币" }

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-09-18
    • 1970-01-01
    • 2019-04-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-10-01
    相关资源
    最近更新 更多