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
12
votes
2 answers

How do I transform an array using Jolt?

I am getting a null value for my transformed object when trying to convert something like this: { "employees": [ { "f_name" : "tom", "l_name" : "smith" }, { "f_name" : "don", "l_name" : "jones" } ] } to this: { "employees": [ {…
wxkevin
  • 1,634
  • 2
  • 25
  • 44
8
votes
1 answer

Jolt conditional spec

I want a conditional transformation where I need to add a property in output if the value of a specific field in input matches my condition. Below is my input and output required. Input { "attr": [ { "name": "first", …
yeswanth
  • 1,543
  • 1
  • 11
  • 19
6
votes
1 answer

Jolt transform json - how to add default fields

I have below input JSON: { "id": "2ef8a2ee-054f-4b43-956a-8aa4f51a41d5", "type": "VOICE", "tags": [ { "id": "some id 1", "description": "some description 1" }, { "id": "some id 2", "description": "some…
6
votes
2 answers

With Jolt json transformation, is it possible to copy a value into two different attributes?

Am trying something very simple with Jolt transformation but struggling to get it to work. If I have an input like: { "id": "54436001" } I want output to be: { "mediaId" : "54436001", "events" : { "mediaId" : "54436001" } } Which is…
Sammy
  • 151
  • 2
  • 6
6
votes
1 answer

Extracting values from first array element with Jolt

I have the following JSON document: { "pbid": 123, "pid": 0, "time": 1483551745000, "timestamp": "2017-01-04 17:42:25", "creationTime": 1483551789000, "creationTimestamp": "2017-01-04 17:43:09", "name": "myname", …
Arj
  • 1,981
  • 4
  • 25
  • 45
5
votes
2 answers

Is it possible to concatenate the values of JSON attributes using JOLT?

I am wondering if there is any way to concatenate the values of JSON attributes into one new attribute using JOLT transformation. For example, I have the following JSON: { "name": "Mary", "Year Joined": "2017", "Gender": "Female" } and I…
purplewind
  • 331
  • 10
  • 26
4
votes
2 answers

Jolt transform JSON array keep rest of the fields

How to keep other fields in the Jolt transform JSON array, I am trying to use wildcard but fields are not added in the final output? Here is the example input I am using [ { "foundduring": "D-DC", "user_type": "type1", "location":…
user393014
  • 445
  • 1
  • 8
  • 15
4
votes
1 answer

Split array inside JSON with JOLT

I have a JSON look like: [ { "mainId": 12854, "subIds": [ 25, 26, 27 ] } ] I want to split values inside subIds to create diffrent rows. Can I get expected result with JOLT? [ { "mainId": 12854, "subId":…
fujidaon
  • 355
  • 1
  • 6
4
votes
2 answers

JOLT shift transformation to filter values in array

I want to use a JOLT transformation to do two things: filter the elements in the array called myarray so that only elements remain which have a "v_518" attribute filter out all attributes of the remaining elements except for "v_518" and…
DSC
  • 365
  • 3
  • 17
4
votes
3 answers

Ordering of json objects after jolt transformation

Input: { //The input json object } Desired Output: { "Event1": "Value1", "Event2": [ // collection of json objects ], "Event3": { //The input json object } } So basically the input json goes in the…
Ray
  • 43
  • 3
4
votes
1 answer

Nifi JSON ETL: Custom Transformation Class not found with JoltTransformJSON Processor

I'd like to use my custom JSON transformation that implements the com.bazaarvoice.jolt.Transform interface. I use "Custom Transformation Class Name" and "Custom Module Directory" like this: However, I cannot get the JoltTransformJSON processor to…
elkarel
  • 723
  • 2
  • 7
  • 20
4
votes
2 answers

Apache Nifi 1.7.1 Flatten Json with delimiter

I am using the Flatten Json processor with delimiter _ , this works fine in so far that it does flatten nested records. But I also noticed that it interferes with keys which already have "_" in them. For eg: { "first_name":…
irrelevantUser
  • 1,172
  • 18
  • 35
4
votes
1 answer

How do I use Jolt to flatten a json array of n objects?

Just starting out with Jolt and I'm trying to transform the following input: { "task_name": "Data Full Load", "table": "enterprise", "schema": "dbo", "op": "F", "data": [ { "enterprise_id": "00001" }, …
DataG
  • 125
  • 2
  • 11
3
votes
1 answer

How to add one object into the another objects and remove that object using jolt spec

I want to remove all the nested arrays and put values of "location" and "metarecord" in the rest json object and finally remove these object ("location" and "metarecord"). { "info": [ { "item": "sugar", "price": 4, "state":…
kif
  • 33
  • 4
3
votes
1 answer

How to unlist JSON item with lists into multiple items using JOLT?

I have the input raw JSON file like this below: [ { "itemId": "001", "region": "North", "cume": [ 150, 200, 300, 360 ], "type": [ "total", "app", "web", "registered" ] }, …
ysh_115
  • 33
  • 4
1
2 3
87 88