Created on 06-04-2018 02:04 PM - edited 09-16-2022 06:17 AM
I am suffering the same problem described here.
I am setting the JoltSpecification property using expression language, but something it's going wrong.
My NiFi version is:
Powered by Apache NiFi - Version 1.5.0.3.1.1.0-35
02/25/2018 20:13:30 UTC
Tagged nifi-1.5.0-RC1
I create a POC with an UpdateAttribute that is creating the attribute 'transformRules' with the value:
[{"operation":"shift","spec":{"*":{"PartNr":"[&1].PartNumber","TcdMakeID":"[&1].Description","TcdCountryCode":"[&1].PartPrice"}}}]
Then I have a JoltTransformJSON processor that uses this attribute as Jolt Specification, and the components looks like this:
ideas about how can I solve this issue?
Thanks in advance.
Created 06-05-2018 01:00 AM
Hi @Óscar Andreu, thank you for reporting the issue.
I was able to reproduce the issue. By looking at the code, there is a bug in how JoltTransformJSON validates the spec when it contains EL. The processor tries to check if the JoltSpec contains any custom transformation class to fail fast, but it fails to get a JoltSpec because EL can not return a valid spec at the validation phase.
I submitted an Apache JIRA for this and will try to fix it.
https://issues.apache.org/jira/browse/NIFI-5268
Thanks!
Created 06-05-2018 01:00 AM
Hi @Óscar Andreu, thank you for reporting the issue.
I was able to reproduce the issue. By looking at the code, there is a bug in how JoltTransformJSON validates the spec when it contains EL. The processor tries to check if the JoltSpec contains any custom transformation class to fail fast, but it fails to get a JoltSpec because EL can not return a valid spec at the validation phase.
I submitted an Apache JIRA for this and will try to fix it.
https://issues.apache.org/jira/browse/NIFI-5268
Thanks!
Created 06-05-2018 11:20 AM
Thank you!