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
3
votes
1 answer

JSON string array to object array using JOLT

For a student project I have to improve data quality. The first step is to request an API. Secondly, we have to edit the json structure. This is the response from the API : { "lists": [ [ 0, 451, …
Alexandre
  • 58
  • 1
  • 8
3
votes
3 answers

Rename fields in nested arrays using JOLT transformation

I want to rename fields in an array nested in an another array using JOLT transformation library. One field to rename is a top level field in an array Two fields to rename are inside a nested array I have tried using wildcards but they are not…
abb
  • 352
  • 1
  • 10
  • 23
3
votes
1 answer

Usage of special character "@" in JOLT template

Please help me in writing the jolt spec to get the expected output with special character "@" as shown below. When I place "@FirstName":"Names.FirstName" in the spec it is not working. Please help in resolving this. JSON Input: { "FirstName":…
phalgun kumar
  • 31
  • 1
  • 2
3
votes
2 answers

What does &(0,1) mean in jolt transformation?

Here (click Convert 'prefix soup', to nested data item) is example of translating prefix json into nested json. Interesting string is "rating-*": "SecondaryRatings.&(0,1)" I understand that * is regular expression for keys, & somehow refer to…
Cherry
  • 31,309
  • 66
  • 224
  • 364
2
votes
1 answer

Flatten a complex nested having a common column JSON using jolt transform

I am facing a problem, transforming a very complex nested JSON using jolt transformation. Input and output detail is given below. Input JSON : { "shipment": { "id": "4f47b29b-0ce1-42cb-8cc9-6c1b87150a74", "identifiers": [ { …
2
votes
0 answers

Dynamic Jolt spec to handle if nested array inside the JSON has single element, multiple element or nested array not exists

Dynamic Jolt spec to handle if subarray inside the JSON has single element, multiple element or subarray not exists My jolt spec is working perfectly fine if we nested array inside the JSON has multiple elements, but if they send a JSON without the…
2
votes
1 answer

How to map using Jolttransform specification in NIFI?

I am preparing the jolt specification but I am unable to complete it, pls help out. Note: There is a credits array, the values of that array should be mapped with schema fields which are of type credit record. Input: { "schema": { "fields": [ …
pandu
  • 31
  • 4
2
votes
3 answers

Jolt Transformation to Filter and Flatten Array Data

I am trying to write a jolt specification to transform an input JSON. I have the following input: [{ "id": "11500887", "created": "2023-03-16T18:34:24.485+0200", "items": [{ "field": "status", "fieldtype": "jira", …
2
votes
1 answer

Jolt spec to apply all keys in a parent object to all objects in an array

Given an input array with objects containing various keys and an active_candidates_group key, with this key being an array of candidate objects, create a new output array where each candidate object is combined with the keys from the parent…
Ben Cooper
  • 79
  • 5
2
votes
2 answers

Exploring JOLT functions for JSON to JSON transformations: An overview

Can someone give a brief explanation of different functions in the JOLT transformation library for JSON to JSON transformations? A brief explanation of JOLT function. Like :- Function name - what it does -- its arguments
2
votes
1 answer

How to write a jolt spec to convert different objects into an array

I have a JSON input and I want to transform it into another JSON that can be easily stored in Java POJOs. An array structure is most suitable according to me as it can be structured easily. I have an input JSON like this: { "rating-1": { …
2
votes
2 answers

Add a property to nested array objects by locating the parent array object

I was wondering if I can use jolt to add property on a a nested array object by looking at the parent array object For example, here is the input.json and I want to add a element called as ownerName in the pet object by looking at the parent owners…
Rock
  • 21
  • 3
2
votes
3 answers

jolt transformation for nested specific key in lowercase

I have a JSON input : { "levelOne": [ { "leveltwo": { "levelThree": [ { "type": "typeOne", "leveltwo": { "Id": "101000094794", "Id2": "101000013207" } …
2
votes
2 answers

Jolt transform - how to rename field with field value?

I'm wondering if there is any way to rename the field by concatenating the values of JSON attributes into existing attribute names using JOLT transformation. Suppose we have input here: { "auth_id": "0000-0000-0000", "read_time":…
Linden HSU
  • 25
  • 6
2
votes
2 answers

JOLT concatenate ONLY if not NULL

I need to change a date from YEAR to a fixed YYYY-MM-DD only if the value of the year is not null. At the moment I have this [ { "operation": "modify-overwrite-beta", "spec": { "Passing?": "=concat(@(1,Passing),-01-01'" } …
Sinuers
  • 53
  • 5
1 2
3
87 88