Five Stars

Extract particular fields by using Talend

Here my question :

Generate 1000 records (1.... 1000) as input.

Expected output: - 1, 100, 200,300,400,500,600,700,800,900,1000  these 11 records alone. 

Please help me to find this.

Thankyou.

1 ACCEPTED SOLUTION

Accepted Solutions
Five Stars

Re: Extract particular fields by using Talend

Thankyou for your support.

It worked for me now

i used MOD function for this 

Mathematical.MOD(row4.Value,100)==0||row4.Value==1

 

Thankyou

5 REPLIES
Five Stars tdz
Five Stars

Re: Extract particular fields by using Talend

Hello Gurumahesh,

 

A job like this one may answer your question. (see attached document)

In this job, I have a ".csv" file in input. This "csv" contains only one column with records from 1 to 1000.

In the "Var expression", I filter on the values I want in output.

My output is a ".csv" file too.

 

I hope this job will help you.

 

TD

 

Twelve Stars TRF
Twelve Stars

Re: Extract particular fields by using Talend

Hi,
Don't know where does the value -1 come from...
From others, you may use the following tmap output expression filter:
row1.value % 100 == 0

TRF
Five Stars

Re: Extract particular fields by using Talend

Thankyou for your reply tdz,

but, If you have more fields how can we extract? Here 1000 rows so we can use this but one million records then we can't able to give every particular row right?

So how to get all first row and all multiples of 100 .

Please let me know if you are not able to get this.

 

Twelve Stars TRF
Twelve Stars

Re: Extract particular fields by using Talend

Not able to get this!
Give us an input sample and the corresponding expected result.

TRF
Five Stars

Re: Extract particular fields by using Talend

Thankyou for your support.

It worked for me now

i used MOD function for this 

Mathematical.MOD(row4.Value,100)==0||row4.Value==1

 

Thankyou