jolt

unable to transform one json form to another using jolt parser

自闭症网瘾萝莉.ら 提交于 2020-06-29 03:49:15
问题 I have a data like below: { "resourceType": "Immunization", "id": "example", "protocolApplied": [ { "series": "2-dose", "authority": { "reference": "Organization/org1", "type": "Organization", "display": "xyz organization" }, "targetDisease": [ { "coding": [ { "system": "http://snomed.info/sct", "code": "40468003" } ] } ], "doseNumberPositiveInt": 1, "seriesDosesPositiveInt": 10 }, { "series": "3-dose", "targetDisease": [ { "coding": [ { "system": "http://snomed.info/sct", "code": "66071002"

Jolt: concat Array values

我的梦境 提交于 2020-06-01 06:42:19
问题 Following my previous post Jolt: split/ concat array values in Nifi Now I'd like another value (ts) to be replicated into each split. My input: [ { "value0": 0, "value1": 1, "value2": 2, "ts": 1 }, { "value0": 3, "value1": 4, "value2": 5, "ts": 2 } ] Desired output: [ { "value0" : 0, "ts": 1 }, { "value1" : 1, "ts": 1 }, { "value2" : 2, "ts": 1 }, { "value0" : 3, "ts": 2 }, { "value1" : 4, "ts": 2 }, { "value2" : 5, "ts": 2 } ] The initial Jolt: [ { "operation": "shift", "spec": { "*": {

Jolt: concat Array values

久未见 提交于 2020-06-01 06:41:00
问题 Following my previous post Jolt: split/ concat array values in Nifi Now I'd like another value (ts) to be replicated into each split. My input: [ { "value0": 0, "value1": 1, "value2": 2, "ts": 1 }, { "value0": 3, "value1": 4, "value2": 5, "ts": 2 } ] Desired output: [ { "value0" : 0, "ts": 1 }, { "value1" : 1, "ts": 1 }, { "value2" : 2, "ts": 1 }, { "value0" : 3, "ts": 2 }, { "value1" : 4, "ts": 2 }, { "value2" : 5, "ts": 2 } ] The initial Jolt: [ { "operation": "shift", "spec": { "*": {

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

不想你离开。 提交于 2020-05-29 10:22:45
问题 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 copying a value to two different attributes. I would be tempted to try spec like this to work, but obviously it doesn't because of duplicate key. [ { "operation": "shift", "spec": { "id": "mediaId", "id": "events.mediaId" } } ] Is this possible with Jolf

How to provide input to jolt when multiple objects are given

北慕城南 提交于 2020-05-17 07:04:13
问题 How to apply transformation to the json file having records in the following format (not array, just multiple objects). I want to provide a file with following input format and after applying transfornation.Want to get it saved in some folder. example: Input Record Format { "name": "adam", "age": 12, "city": "australia" } { "name": "adam", "age": 12, "city": "australia" } { "name": "adam", "age": 12, "city": "australia" } { "name": "adam", "age": 12, "city": "australia" } { "name": "adam",

Rename fields in nested arrays using JOLT transformation

元气小坏坏 提交于 2020-05-08 05:35:50
问题 I want to rename fields in an array nested in an another array using JOLT transformation library. 1. One field to rename is a top level field in an array 2. Two fields to rename are inside a nested array I have tried using wildcards but they are not giving me expected output. I am using JOLT 0.0.22 version. Input JSON: { "country": "usa", "state": [ { "stateName": "TX", "location": "south", "cities": [ { "name": "Austin", "pop": "1M" }, { "name": "Dallas", "pop": "2M" } ] }, { "stateName":

Java使用Jolt连接Tuxedo服务器

末鹿安然 提交于 2020-03-23 14:58:20
3 月,跳不动了?>>> 在电信领域的开发中,现在流行的架构是前台使用java,负责组织业务流程、展现结果,后台使用C/C++来封装各种服务,供前台调用。这就会出现前台Java如何连接Tuxedo服务器,调用服务的问题。通常,有两种解决方案,WTC和Jolt。WTC是weblogic连接tuxedo的专有方案,Jolt是tuxedo本身携带的组件。因为weblogic和tuxedo都是oracle的产品,因此,可以推测,WTC的集成度和效率会高一些,功能强大一些,但须于weblogic绑定,没有Jolt自由度高,因此个人推荐使用Jolt来连接tuxedo. 下面将介绍使用Jolt连接Tuxedo过程中,tuxedo侧的主要配置,以及令人头痛的乱码问题的解决: 1.1 、 ubbconfig 文件配置 为使 Jolt 客户端 正常连接到 Tuxedo 服务器,需要在 ubbconfig 中开启 JSL 和 JREPSVR 两个进程, JSL 用于监听并分发客户端的请求, JREPSVR 进程用于配置 Tuxedo 导出给 Jolt 客户端的服务,具体配置如下: 修改 *RESOURCES 区的 MAXACCESSERS 参数的值为足够大,如 900 。 在 *GROUPS 区添加 JSLGRP 和 JREPGRP 两个 group ,如下: JSLGRP LMID=SITE1

对使用Jolt调用Tuxedo的一个简单的封装

点点圈 提交于 2020-03-23 14:57:31
3 月,跳不动了?>>> 注:大约4年前,在上家公司封装的一个Jolt调用Texedo的包,并写的一个使用文档。不知道现在还有没有人使用Jolt这个东西了。 源码下载地址见文章最后 -------------------------------------------------------------------------------------------------------------------------------- 1 Jolt 通用调用包简介 1.1 调用 Tuxedo 服务的两种方式 在程序开发中,有两种方式可以调用 Tuxedo 服务,分别是: 1. 用 C/C++ 来编写程序,通过 WSL 来调用 Tuxedo 提供的服务。 2. 用 Java 通过 Jolt 包来编写程序,通过 JSL 来调用 Tuxedo 提供的服务。 第一种方式使用 C/C++ 语言开发,效率高,但是程序调试困难,容易出错。 第二种方式使用 Java 语言开发,运行效率相对于第一种方式略有不足,但是开发容易,调试简单。但是为了提供更大的灵活性,使用 Jolt 方式对长连接和短连接调用提供了两套完全不同的 API , 1.2 Jolt 通用调用包的目标 l 简化开发 仅需要编写少量的代码就可以完成 Tuxedo 服务调用。 l 屏蔽长短连接 对于长连接或者短连接

Transforming Array of objects with nested array objects using JOLT

寵の児 提交于 2020-01-24 10:22:10
问题 I want to transform following input JSON to output JSON format INPUT JSON: [ { "orderNumber": "201904-000000001", "items": [ { "itemPrice": 40000, "itemQuantity": 11, "item": { "external_id": "IPHONE" } }, { "itemPrice": 25000, "itemQuantity": 22, "item": { "external_id": "ONEPLUS" } }, { "itemPrice": 35000, "itemQuantity": 33, "item": { "external_id": "SAMSUNGS10" } } ] } ] OUTPUT JSON: [{ "orderNumber" : "201904-000000001", "items" : [ { "itemQuantity" : 11, "external" : "IPHONE" } ] }, {

Transform JSON-JSON JOLT

只愿长相守 提交于 2020-01-17 08:42:06
问题 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": "amprak@mail.com", "PHONE": "809386731", "TS":"2015-11-19 14:36:34.0" }, { "PK": 12654, "FULL_NAME": "Rohit Dhand", "BIRTHDATE":"1979-02-01", "SEX":"M", "EMAIL": "rodha@mail.com", "PHONE": "937013861", "TS":"2015-11-20 11:03:02.6" }, ... ] and this is my desired output: { "records": [ { "attribs": [{