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

Nifi convert json to custom json using jolt script

I have json like { "error_message_1": "missing_field_1", "error_message_2": "missing_field_2", "error_message_3": "missing_field_3" } I want json to be formed as below { "payloads":[ { "error_message_1":…
Sagan Pariyar
  • 200
  • 1
  • 1
  • 11
0
votes
1 answer

Jolt: How do I split the json value and capitalize it in the output json?

I want to transform this: { "key": "MyNamespace.myName", "value": true } to { "data": { "header": { "namespace": "MyNamespace", "name": "SetMyName", "messageId": "UUIDString" }, "payload": { "myName":…
bycfly
  • 341
  • 3
  • 13
0
votes
1 answer

Jolt, copy value along array

I want to transform a JSON using JOLT, in the following way.: Input of json file { "Document_No": "ANG4", "LineNo10": { "Type": 1, "Customer_No_": "1" }, "LineNo11": { "Type": 2, "Customer_No_": "2" }, "LineNo12": { …
tomar
  • 83
  • 1
  • 1
  • 7
0
votes
1 answer

How to add indices in an array in jolt transformation

I am trying to modify my input and add an id for each object with '-indexNum' but this seems not working.Here I m posting my code. My input, { "employees": [{ "f_name": "tom", "l_name": "smith" }, { "f_name":…
tender
  • 3
  • 1
  • 4
0
votes
1 answer

Implicit array creating in jolt

Input: { "categories": { "1": { "name": "Books" }, "2": { "name": "Games" } } } Spec: [ { "operation": "shift", "spec": { "categories": { "*": { "@": "categories" } } …
DarkLeafyGreen
  • 69,338
  • 131
  • 383
  • 601
0
votes
1 answer

Create new attribute with jolt transform

I try to transform { "name": "bla", "latitude": 1, "longitude": 2 } into { "name": "bla", "location": { "latitude": 1, "longitude": 2 } } with following shift operation [ { "operation": "shift", "spec": { …
DarkLeafyGreen
  • 69,338
  • 131
  • 383
  • 601
0
votes
1 answer

Jolt convert array keys

I want to convert keys in array json by using jolt Input [ { "TestString": "AGC", "TestNumber": "3" }, { "TestString": "DDD", "TestNumber": "2" } ] Out put: [ { "test_string": "AGC", "test_number": "3" }, { …
Randy
  • 81
  • 3
  • 10
0
votes
1 answer

Apache Nifi transform with JoltTranform processor

I have some attributes myId, count. Now with these attributes I want write down the Jolt format to get the following output. { "projectId": "projectId", "ticketId": "NO_TICKET", "trigger": "SCHEDULED_BACKLOG", "timestamp": 1539060316494, …
0
votes
1 answer

Nifi, Json data

I have JSON input data as { "type": "insert", "timestamp": 1536959101000, "binlog_filename": "mysql-bin-changelog.234234", "binlog_position": 223, "database": "test", "table_name": "demo", "table_id": 138, "columns": [ { …
Thuy Le
  • 11
  • 6
0
votes
0 answers

Jolt transform to remove dash plus something more complicated

Input { "item" : "some value", "get" : :some other value", "org"{ "animal-type": ["mammal","reptile","bird"], "animal-name": ["rat","pigeon"], "some-random": ["one array"] .... ....any number of items with any name can show up here.. ....…
0
votes
1 answer

How to perform mapping values in jolt

I am trying to perform conditional mapping of values from the following JSON. My input, { "rating": [ { "id": 1, "locations": [ { "num": 1 }, { "num": 2 } ] } …
klp9
  • 1
  • 1
0
votes
1 answer

Nifi jolt spec to flatten array

I have json input with array: { "id": 3, "name": "ROOT", "mylist": [{ "id": 10, "info": "hello" }, { "id": 11, "info": "world" } ] } That i would like to transform into "flat"…
vic
  • 45
  • 2
  • 9
0
votes
0 answers

Shift operation in json Array of object

Input Json Object { "Customer": { "CustomerName": "John Miller", "CustomerType": "Banker", "Attribute1": "", "Attribute2": "", "Attribute3": "", "Attribute4": "", "Contacts": [ …
0
votes
1 answer

JOLT spec for nifi processor

I have following JSON input { "events": [ { "cluster_id": "0717-035521-puny598", "timestamp": 1535540053785, "type": "TERMINATING", "details": { "reason": { "code": "INACTIVITY", …
Rakesh Prasad
  • 602
  • 1
  • 13
  • 32
0
votes
1 answer

Jolt to Transform JSON Array

I want to use Jolt to transform a JSON dataset. The problem is that my entire dataset is treated like an array because it is originally transformed from XML. Here is an example of the first 3 records: { "XMLSOCCER.COM" : { "Team" :[{ …