- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Date Transformation using JoltTransform
- Labels:
-
Apache NiFi
Created ‎11-02-2022 01:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello all, NiFi Jolt question
Does anyone know if it's possible to convert timestamp formats using Jolt using 'field.value' the way you can using update Record?
I'm aware that I can use an attribute value in Jolt to convert a field, like:
"date" : "${timestamp:toDate('yyyy-MM-dd HH:mm:ss'):toNumber()}"
but I was wondering if this function can be done using Jolt on incoming 'field.values', have tried using the default spec as below but it doesn't change the format.
Thanks in advance.
Andy
Created ‎11-02-2022 02:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
this does not seem to be possible for me.
You can use before JOLTTransformation the Processor EvaluateJsonPath to store the date to an attribute and afterwards you could do your convertation with expression language function in JOLT.
Greetings
Created ‎11-02-2022 02:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
this does not seem to be possible for me.
You can use before JOLTTransformation the Processor EvaluateJsonPath to store the date to an attribute and afterwards you could do your convertation with expression language function in JOLT.
Greetings
Created ‎11-02-2022 05:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Agreed, you do not have access to the fields in either the incoming or outgoing JSON objects using Expression Language in the spec.
