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 Transform Nested Grouping

I have a JSON that has this flat structure: [{ "PK": "1111", "SOURCE_DB": "Oracle", "CONTACT_TYPE": "Phone", "CONTACT_SUBTYPE": "Work", "EMAIL": null "PHONE_COUNTRY_CODE": "44", "PHONE_NUMBER": "12345678", …
oikonomiyaki
  • 7,691
  • 15
  • 62
  • 101
0
votes
2 answers

Apache Nifi JOLTTransformJSON Processor

I have a flow that is designed to pull tweets using Get twitter processor and I use JOLTTransformJSON processor to extract few attributes including the hashtags, my Jolt Specification is as follows [ { "operation": "shift", "spec": { "entities":…
user1675314
0
votes
1 answer

JOLT subtree validation based on one of the property values

I am a jolt newbie. I have the following question, I have a JSON document structure of which may vary based on the type property. See my example below. { "recipientId": "xxx", "messages": [ { "type": "text", …
Ihor M.
  • 2,728
  • 3
  • 44
  • 70
0
votes
2 answers

Jolt Transform using two 2 values to create a new key/value pair

I have a JSON input that I am transform using JOLT shift. My problem is I want to use the value of an input key, as a new key in the output data, and in parallel add another value into that new outputted key. Here is my input: "Description": { …
0
votes
1 answer

JSON to JSON transformation using JOLT

input { "ances": [ { "id": 1, "level": "Building", "name": " Metro Campus Outdoor" }, { "id": 2, "level": "Campus", "name": " Metro Campus" } ] } expected output: { "result": [ …
Shilpi
  • 109
  • 3
  • 12
0
votes
1 answer

JOLT JSON array of strings

I am trying to convert an array of strings to regular string.but with my spec file,it comes back as array always Sample input (from ES) { ... "hits": { "total": 1, "max_score": 1.4818809, "hits": [ { …
user2297083
  • 168
  • 11
0
votes
1 answer

Rename property depending on value of sub-property using a Jolt spec

I have a need to change the name of JSON property but only if the value of a sub-property is a specific value. In the example below I want to rename data.relationships.policyHolder to data.relationships.companies but only if…
Shane Rowatt
  • 1,951
  • 3
  • 27
  • 44
0
votes
0 answers

How to group duplicated JSON Objects in JOLT Schema or NiFi Processors?

How can i convert INPUT below into the following OUTPUT ? I've tried using EvaluateJSONPath -> MergeContent, but not getting the right result. Can anyone help and share screen-captures/codes please ? INPUT {"Customers":{ "AccountProfile": { …
0
votes
1 answer

Jolt grouping together

I have this input in JSON, I am having difficulty grouping things together: [ { "PK": "123", "SURNAME": "CHEN", "SEX": "F", "DATE_OF_BIRTH": "1962-08-29 00:00:00.0", "PHONE_TYPE": "05", …
oikonomiyaki
  • 7,691
  • 15
  • 62
  • 101
0
votes
1 answer

Assign two values into one dynamic increment variable using jolt spec

I need to assign two values into one dynamic increment variable using jolt spec. I am trying the code below but I am getting an error "JointOwner_*": { "$": [ …
ram
  • 1
0
votes
1 answer

Jolt - change format of elasticsearch response

This should be a no brainer as Jolt was built mainly to transform ES ,mongodb responses.But I am unable to figure it out I want to parse ES response and print only selected fields. For instance I want to transform the response to { "time" :…
user2297083
  • 168
  • 11
0
votes
1 answer

Transform JSON-JSON JOLT

I am quite new to JOLT and I need to transform my JSON files to the desired schema. This is my input [ { "PK": 12345, "FULL_NAME":"Amit Prakash", "BIRTHDATE":"1987-05-25", "SEX":"M", "EMAIL":…
oikonomiyaki
  • 7,691
  • 15
  • 62
  • 101
0
votes
1 answer

JOLT spec to convert a nested JSON to a denormalized JSON

Need Jolt spec for converting a nested JSON to a denormalized JSON. Input: { header : company: "ABC", ip: 10.3.2.4, network : [ {url:"http://abc.in", "latency":2000}, {url:"http://xzy.au", "latency":2000}], } Output: [ { …
0
votes
1 answer

Nested Jolt Transformation not working

{ "items": [ { "itemId": 1, "itemName": "OKRA", "stock": [ { "stock": 50, "salePrice": 150 }, { …
0
votes
1 answer

Jolt Spec needed for JSON denormalization

I have json in the following format (not limited to just two documents like in this example, there could potentially be many, many more): [{ "ownerId": "XTV7I728", "vehicleId": "999", "engineId": "1", "engineName": "Standard Engine", …
benjammin
  • 537
  • 5
  • 23