-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NIFI-10865 allow RecordPath's unescapeJson to convert de-serialised JSON Objects into Records #6708
Conversation
bf5fdaf
to
a5cf606
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not appear to work if the schema contains a child element. Tested this schema and JSON with UpdateRecord
using /embedded
and unescapeJson(/str)
as the configured update and got an exception:
Schema:
{
"name": "Parent",
"type": "record",
"fields": [{
"name": "str",
"type": "string"
},
{
"name": "embedded",
"type": [{
"name": "EmbeddedRecord",
"type": "record",
"fields": [{
"name": "label",
"type": "string"
},
{
"name": "child",
"type": {
"name": "ChildRecord",
"type": "record",
"fields": [{
"name": "name",
"type": "string"
}]
}
}
]
}, "null"]
}
]
}
Data:
{
"str": "{\"label\":\"Test!\",\"child\":{\"name\":\"Child record!\"}}",
"embedded": null
}
a5cf606
to
36bcf4d
Compare
@MikeThomsen I rebased on If you still get an error, can you elaborate with the meagre and/or stacktrace? |
36bcf4d
to
b1362eb
Compare
b1362eb
to
60c6797
Compare
…SON Objects into Records NIFI-10865 allow UpdateRecord to replace the Record root for relative paths, e.g. when a RecordPath function is used to modify selected field(s)
60c6797
to
98f6289
Compare
I don't know what I did that first round, but you were right. I went back and did it over from scratch, and it worked. |
…SON Objects into Records NIFI-10865 allow UpdateRecord to replace the Record root for relative paths, e.g. when a RecordPath function is used to modify selected field(s) This closes #6708 Signed-off-by: Mike Thomsen <mthomsen@apache.org>
Summary
NIFI-10865 allow RecordPath's unescapeJson to convert de-serialised JSON Objects into Records
NIFI-10865 allow UpdateRecord to replace the Record root for relative paths, e.g. when a RecordPath function is used to modify selected field(s)
Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
Pull Request Tracking
NIFI-00000
NIFI-00000
Pull Request Formatting
main
branchVerification
Please indicate the verification steps performed prior to pull request creation.
Build
mvn clean install -P contrib-check
Licensing
[ ] New dependencies are compatible with the Apache License 2.0 according to the License Policy[ ] New dependencies are documented in applicableLICENSE
andNOTICE
filesDocumentation