• Index
  •  » Talend Enterprise Data Integration » General questions
  •  » how to apply business logic for a field

#1 2012-06-25 08:22:06

s2btalend
Member
Registered: 2012-05-27
Posts: 12

how to apply business logic for a field

hi,

i need to read a file and convert the data as schema based on position in that filed (schema) i need to apply some business logic that business logic also available from table(database)

ex:

schema:
f1,f2,f3

business;
b1=f1+f2
b2=f1 is null f2+f3 or f2 is null f1+f3 or f1+f2+f3


outfield1=b1;
outfield2=b2;

how to acheive this please help me on this.

Thanks and Regards,
G.Suresh.

Offline

#2 2012-06-25 08:28:27

pedro
Member
Registered: 2011-11-17
Posts: 3682

Re: how to apply business logic for a field

Hi

You might do this in the component tJavaRow.

output_row.b1 = input_row.f1 + input_row.f2;
output_row.b2 = input_row.f1==null?(input_row.f2+input_row.f3):(input_row.f2==null?(input_row.f1+input_row.f3):(input_row.f1+input_row.f2+input_row.f3))

Regards,
Pedro


Only Paranoid Survive.

Offline

#3 2012-06-25 08:35:48

s2btalend
Member
Registered: 2012-05-27
Posts: 12

Re: how to apply business logic for a field

hi,

thanks for your reply

this is not static business logic it will get change.
business logic also need to fech from table(database).

how we can implement that.

thanks and regards,
G.Suresh.

Offline

#4 2012-06-25 08:43:35

pedro
Member
Registered: 2011-11-17
Posts: 3682

Re: how to apply business logic for a field

Hi G.Suresh

Code:

this is not static business logic it will get change. 
business logic also need to fech from table(database).

I think it's impossible to finish this requirement... Sorry. It can't be a dynamic job with dynamic business logic.

Regards,
Pedro


Only Paranoid Survive.

Offline

  • Index
  •  » Talend Enterprise Data Integration » General questions
  •  » how to apply business logic for a field

Board footer

Powered by FluxBB