Hi,
I have a requirement for transforming JSON on Nifi which seems simple but I haven't been able to solve:
Input json:
{
"agent-submit-time" : -1,
"agent-end-time" : 123445,
"agent-name" : "Marie Bayer-Smith"
}
Desired:
{
"agent_submit_time" : -1,
"agent_end_time" : 123445,
"agent_name" : "Marie Bayer-Smith"
}
-I don't want to use the ReplaceText processor since replacing "-" for "_" might impact values too
-I need this to be able to infer AVRO schema on incoming JSON records (AVRO does not like the dashes at all)
-since I already use a Jolt processor for another transformation in the JSON it makes sense to include it in the same processor to prevent unnecessary Nifi overhead.
I think I would need the JoltTransformJSON processor as it is very powerful (but the syntax evades me) for this but open for other options too.