Questions tagged [jolt]

A JSON to JSON transformation library written in Java.

Jolt is a to JSON transformation library written in .

For more information, see the GitHub page.

Latest release: 0.1.6 released on Mar 28, 2022

1312 questions
0
votes
1 answer

Jolt with complex data json

I have a below json, from which I want to extract the another json using jolt. Using JOLT transform demo website, I am able to coin some spec but it doesnt gives me the exact json I want. { "status": "OK", "recordCount": 26, "startTimestamp":…
plzdontkillme
  • 1,497
  • 3
  • 20
  • 38
0
votes
1 answer

Jolt Transformation

I am trying to write a jolt transformation for below input - { "restaurantId": "ZZ4ORJDY3E", "chainId": "a-b" } expected output is - { "ZZ4ORJDY3E" : { "key" : "ZZ4ORJDY3E", "start" : "a", "end" : "b" } } My spec is - [ { …
geekintown
  • 119
  • 1
  • 10
0
votes
1 answer

Copying document with varying config through jolt transform

My goal is to take an input document that has an array within a subtree and copy the entire document into an array of copies of the document, with individual values from that array set in each subsequent copy. As an example: Starting Document: { …
Tyler Lee
  • 2,736
  • 13
  • 24
0
votes
2 answers

Nested transformation using jolt transformer

How can I do nested / recursive transformation using Jolt transformation. I m trying to the get the desired output before inputting it to the subsequent service. My Input is { "took": 7, "timed_out":…
0
votes
1 answer

Make Sum in Json Array With JOLT

I am Trying to make a sum in Json Array with Jolt but i did not succeess. This is my json : [ { "times-entries": { "offset": 0, "time_entries": [ { "hours": 1 }, { "hours": 2 } ] }}] This is what I expect…
0
votes
2 answers

How to add key value tag with value=current_timestamp in json using jolt

I am trying to do JSON to JSON transformation using jolt, I have below sample JSON wants to convert to expected JSON. Can you please help me with this using jolt library. I also want to add a new key-value pair "created_ts" tag which will hold value…
nilesh1212
  • 1,561
  • 2
  • 26
  • 60
0
votes
2 answers

remove duplicates Dedup using jolt

i need to remove the duplicates in json message using jolt framework with insuredId and copy the unique insuredId and insuredName to namecode and name respectively,i have acheived removing the duplicates with the insuredId but i dont know how to…
Ravi
  • 1,247
  • 4
  • 15
  • 35
0
votes
1 answer

Jolt: modify-default-beta: what does the first argument do?

I came across this question regarding replacing a non-existing field with another field's value. It explains the usage of modify-default-beta operation. Example mentioned in the post: Spec [ { "operation": "modify-default-beta", "spec": { …
ishan3243
  • 1,870
  • 4
  • 30
  • 49
0
votes
2 answers

Simple jolt transformation

I'm struggling with a very simple jolt transformation. I want to copy the whole input json (structure not known) into an array in the output json. So for example the input could be: { "rating": { "quality": { "value": 3, …
mweb84
  • 47
  • 3
  • 7
0
votes
1 answer

How will the JOLT spec look to achieve desired result with the following input?

I am having troubles transforming JSON payload into the desired document. I have following input: { "events": [ { "recipientId": "r0001" }, { "recipientId": "r0002" } ], "networkResponseTime": 1234 } Desired…
Ihor M.
  • 2,728
  • 3
  • 44
  • 70
0
votes
1 answer

Jolt reference first element in array as target name

I have been looking at this for a few weeks (in the background) and am stumped on how to convert JSON data approximating a CSV into a tagged set using the NiFi JoltTransformJson processor. What I mean by this is to use the data from the first row of…
Mark
  • 5
  • 1
  • 3
0
votes
1 answer

jolt specification for a JSON conversion

Need help with a JOLT specification for converting the JSON from the shared input format to the expected format. Input JSON: { "DataModel": { "Header": { "TMS_ID": "2030617701", "PROCESS_CD": "WvWellHeader", "BATCH_ID":…
0
votes
1 answer

How do I transform this json using Jolt?

I have an input json as follows { "outer1": "value1", "outer2": "value2", "attributes": [ { "name": "n1", "value": "v1" }, { "name": "n2", "value": "v2" } ] } I want to transform this to the…
0
votes
1 answer

JOLT transformation to flatten the entire json document with help of

i have below json : { "deveui": "1000", "vars": [ { "name": "CfgNo", "value":"255" }, { "name":"Status","value":{ "lampS": "unknown(0xff)", "lampL": "255" …
Shilpi
  • 109
  • 3
  • 12
0
votes
1 answer

Simplifying Google Sheet JSON using Jolt

I have gone through most of the test cases in Jolt that seem to serve as examples, but cannot find anything that does what I am looking for. For background, the source code is a stripped version of what comes from a google sheet. So rows and…
Mark
  • 5
  • 1
  • 3