提问人:Kyle 提问时间:5/21/2023 最后编辑:Kyle 更新时间:5/21/2023 访问量:66
NiFi 'ValidateRecord' 无法验证 'ConvertRecord' 使用相同架构成功处理的 XML 记录
NiFi `ValidateRecord` fails to validate XML records that `ConvertRecord` successfully processes using same schema
问:
我已经为此发布了一个 jira,尽管我不确定这是一个错误还是我做错了什么:https://issues.apache.org/jira/browse/NIFI-11577
输入数据:
<?xml version="1.0" encoding="UTF-8"?>
<wd:Report_Entry xmlns:wd="urn:com.workday.report/foo">
<wd:Req_ID>REQ-7602</wd:Req_ID>
<wd:Job_Requisition Descriptor="REQ-7602 Trader (Open)">
<wd:ID type="WID">91384a20a89001a955bb7ded1401271f</wd:ID>
<wd:ID type="Job_Requisition_ID">REQ-7602</wd:ID>
</wd:Job_Requisition>
<wd:wd:Report_Entry>
转换记录的输出
<?xml version="1.0" ?>
<PendingHiresEntryType>
<requisition_id>REQ-7602</requisition_id>
<job_requisition>
<id_field>
<content_value>91384a20a89001a955bb7ded1401271f</content_value>
<type>WID</type>
</id_field>
<id_field>
<content_value>REQ-7602</content_value>
<type>Job_Requisition_ID</type>
</id_field>
<description>REQ-7602 Trader (Open)</description>
</job_requisition>
</PendingHiresEntryType>
使用的 Avro 架构
{
"type" : "record",
"name" : "PendingHiresEntryType",
"namespace" : "ns",
"fields" : [ {
"name" : "requisition_id",
"type" : [ "null", "string" ],
"default" : null,
"aliases" : [ "Req_ID" ]
}, {
"name" : "job_requisition",
"type" : [ "null", {
"type" : "array",
"items" : {
"type" : "record",
"name" : "WdDescribedIdType",
"fields" : [ {
"name" : "id_field",
"type" : [ "null", {
"type" : "array",
"items" : {
"type" : "record",
"name" : "WdAttributedIdType",
"fields" : [ {
"name" : "content_value",
"type" : [ "null", "string" ]
}, {
"name" : "type",
"type" : "string"
} ]
}
} ],
"default" : null,
"aliases" : [ "ID" ]
}, {
"name" : "description",
"type" : [ "null", "string" ],
"default" : null,
"aliases" : [ "Descriptor" ]
} ]
}
} ],
"default" : null,
"aliases" : [ "Job_Requisition" ]
} ]
}
我期待这个记录会通过,但它失败了;而成功确认了字段及其值。ValidateRecord
ConvertRecord
答: 暂无答案
评论