Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need to create the following csv starting from the json below
{
"data": [{
"id": 1,
"data": {
"Tid": 1,
"derived.security.Coupon.notional": 10,
"derived.security.Coupon.paymentAmount": {
"rows": [{
"paymentAmount": 1,
"periodNum": 1
}, {
"paymentAmount": 2,
"periodNum": 2
}
]
},
"derived.security.Coupon.paymentRate": {
"rows": [{
"paymentRate": 0.5,
"periodNum": 1
}, {
"paymentRate": 0.25,
"periodNum": 2
}
]
},
"derived.security.Coupon.schedule.scheduleType": "A",
"derived.security.Coupon.schedule": {
"rows": [{
"accrualEndDate": "31/12/2021",
"periodNum": 1
}, {
"accrualEndDate": "31/12/2022",
"periodNum": 2
}
]
},
"security": {
"rows": [{
"name": "APPLE"
}, {
"name": "PINTEREST"
}, {
"name": "GOOGLE"
}
]
}
}
}, {
"id": 3,
"data": {
"Tid": 3,
"derived.security.Coupon.notional": 40,
"derived.security.Coupon.paymentRate": {
"rows": [{
"paymentRate": 2,
"periodNum": 1
}, {
"paymentRate": 1.5,
"periodNum": 2
}
]
},
"derived.security.Coupon.schedule.scheduleType": "C",
"derived.security.Coupon.schedule": {
"rows": [{
"accrualEndDate": "31/03/2021",
"periodNum": 1
}, {
"accrualEndDate": "31/03/2022",
"periodNum": 2
}
]
}
}
}, {
"id": 4,
"data": {
"Tid": 4,
"derived.security.Coupon.notional": 20,
"derived.security.Coupon.paymentAmount": {
"rows": [{
"paymentAmount": 2,
"periodNum": 1
}, {
"paymentAmount": 4,
"periodNum": 2
}
]
},
"derived.security.Coupon.paymentRate": {
"rows": [{
"paymentRate": 2,
"periodNum": 1
}, {
"paymentRate": 1.5,
"periodNum": 2
}
]
},
"derived.security.Coupon.schedule.scheduleType": "D"
}
}
]
}
Could you please help me?
Thanks,
Paolo
@not specified not specified , if you are using Talend Enterprise software you can leverage Talend Data Mapper would be easy to convert this.
Thanks,
Manohar
can't we do with other components/approaches rather than using Talend Data Mapper?
Thanks,
Talend_ent.
You can try tJSONDoc component available in the Talend Extensions... its source is available https://github.com/jlolling/talendcomp_tJSONDoc