Four Stars

Fetch most recent by date and process

Hi,

Could you please tell how to design and implement following scenario?

I need to fetch most recent 4 records(based on Created Date) for every OppID and map those Category values to Category1,Category2,Category3,Category4.

 

I have attached file delimited below.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Nine Stars

Re: Fetch most recent by date and process

HI,

Job flow is like screen shot i provided in previous post. 

First convert createDate from string to date using tMap. 

By using tSort sort data based on PorID and createDate.

Create sequence for each ProID and filter records >4. Means you are going o consider on first four records for each id. 

Using tMap create 4 new fields.

First42.PNGFirst43.PNG

Regards,

 

Veeru Boppudi
3 REPLIES
Nine Stars

Re: Fetch most recent by date and process

Are you looking for the following output?First41.PNG

 

Regards,

Veeru Boppudi
Four Stars

Re: Fetch most recent by date and process

Veeru,

Yes Correct Could you please let me know how to do it.

 

Appreciate your help.

Nine Stars

Re: Fetch most recent by date and process

HI,

Job flow is like screen shot i provided in previous post. 

First convert createDate from string to date using tMap. 

By using tSort sort data based on PorID and createDate.

Create sequence for each ProID and filter records >4. Means you are going o consider on first four records for each id. 

Using tMap create 4 new fields.

First42.PNGFirst43.PNG

Regards,

 

Veeru Boppudi