Talend Connect
Virtual Summit
JOIN US!
And visit the Customer
& Community Lounge.
May 27-28, wherever you are.

[resolved] Generating multiple rows based on the input

Highlighted
One Star

[resolved] Generating multiple rows based on the input

Hi,
I am trying to generate an amortization schedule for loans based on certain inputs. So each input row will map to multiple output rows. E.g. for an input set of (Term=10,interest rate=5%, Principal = 1000,payment = 20) I want to generate the amortization over the 10year term. This requires generating multiple rows. What is the best way to go about this? Many thanks.


Accepted Solutions
Highlighted
Ten Stars

Re: [resolved] Generating multiple rows based on the input


All Replies
Highlighted
Moderator

Re: [resolved] Generating multiple rows based on the input

Hi,
Could you please elaborate your case with an example with input and expected output values?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Highlighted
One Star

Re: [resolved] Generating multiple rows based on the input

Hi,
tSplitRow is a way but maybe not the best if a lot of output rows must be generated from a single input row.
tJava or tJavaFlex to complete an array with expected values should be better (have to code).

Regards,
TRF
Highlighted
One Star

Re: [resolved] Generating multiple rows based on the input

Hi, 
To illustrate my scenario with an example: Suppose data (which relates to loans) has a row with the following columns: Term = 2 year, Interest rate=5%, Principal = 100. The payments of this loan are made on a monthly basis so in the output I want to have: Payment date (monthly), Interest portion, Principal portion, total payment and ending balance. So in this case 1 row will map to 24 rows (2 x 12). Hope this explains my requirement clearly. Many thanks.
AA
Highlighted
Six Stars

Re: [resolved] Generating multiple rows based on the input

Hi,
Are you looking for something like demarcation per month (based on your term) ? and for each month you want to calculate Principal portion .... etc?
Thanks
Highlighted
One Star

Re: [resolved] Generating multiple rows based on the input

Hi ABelkacemi,
Yes, something like that. So for each month I will have columns for 1)payment amount 2) principal portion 3)interest portion 4)ending principal balance
Thanks.
Highlighted
Six Stars

Re: [resolved] Generating multiple rows based on the input

The data come from a database or file?
Highlighted
One Star

Re: [resolved] Generating multiple rows based on the input

As the number of output rows varies, the way is tJava family components.
Highlighted
Ten Stars

Re: [resolved] Generating multiple rows based on the input

Highlighted
One Star

Re: [resolved] Generating multiple rows based on the input

Thanks rhall, the solution worked!

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog