Support Questions
Find answers, ask questions, and share your expertise
Check out our newest addition to the community, the Cloudera Innovation Accelerator group hub.

UpdateRecord won't update nested fields


I have this XML file:

        <firstName>Some</firstName> <!-- required -->
        <lastName>Guy</lastName> <!-- required -->
        <email></email> <!-- required if phone not included -->
        <phone></phone> <!-- required if email not included -->

Using this schema

    "namespace": "com.organization.somethingspecific",
    "name": "request",
    "type": "record",
    "fields": [
      {"name": "requestType", "type": ["string","null"], "default": null},
      {"name": "requestDomainType", "type": ["string","null"], "default": null},
      {"name": "systemName", "type": ["string","null"], "default": null},
      {"name": "location", "type": ["string","null"], "default": null},
      {"name": "userInformation", "type": ["null", {
        "name": "userInformation", "type": "array", "items": {
          "name": "userInformation", "type": "record", "fields": [
            {"name": "userId", "type": ["string","null"], "default": null},
            {"name": "firstName", "type": ["string","null"], "default": null},
            {"name": "lastName", "type": ["string","null"], "default": null},
            {"name": "email", "type": ["string","null"], "default": null},
            {"name": "phone", "type": ["string","null"], "default": null}
      }], "default": null},
      {"name": "requestObject", "type": ["null",{
        "name": "requestObject", "type": "array", "items": {
          "name": "requestObject", "type": "record", "fields": [
            {"name": "startDate", "type": ["string","null"], "default": null},
            {"name": "endDate", "type": ["string","null"], "default": null},
            {"name": "type", "type": ["string","null"], "default": null}
      }], "default": null}

I am confident that the schema is correct because I am able to convert from XML to JSON no problem.

However UpdateRecord is not able to alter nested fields no matter how I reference them. I have the following UpdateRecord processor:


At the very least I would expect //startDate to work since that is SUPPOSED to ignore hierarchy, but I can only update top level fields such as /requestType which is the only one that actually updates of the 4 in my configuration.

I am following the documentation exactly, what else could be wrong? Any help appreciated.



Was able to solve this by removing my usage of arrays from my schema

Expert Contributor

Hi @Andrew Riffle it looks like I'm facing the same problem.

I dont't understand your remark concering your solution.

You deleted the "array"-line from your schema and then it worked OR you don't work with an array anymore?

Could you please make this clear? Thanks!

New Contributor

Hello guys,
I have the same problem and I would also like you to explain a bit how you made this work. I have followed the help guidelines but can't make it work.