GeekInterview.com
Series: Subject: Topic:
Question: 50 of 236

Cummulative summary in AB Initio

How can I achieve cummulative sumary in AB Initio other than using SCAN component. Is there any inbuilt function available for that?
Asked by: abinitio17 | Member Since May-2008 | Asked on: May 24th, 2008

View all questions by abinitio17

Showing Answers 1 - 5 of 5 Answers


Scan is really the most simple way to achieve this.  Another way is to use a ROLLUP, since it is a multistage component.  You need to put the ROLLUP component into multistage format and write the intermediate results to a temp array (I think they're called vectors in AI).  The ROLLUP loops through each record in your defined group.

Let's say you want to get intermediate results by date.  You sort your data by {ID; DATE} first.  Then ROLLUP by {ID}.  The ROLLUP will execute it's transformation for each record per ID.  So store your results in a temp vector, which will need to be initialized to be the size of your largest group.  Each time the ROLLUP enters the tranformation, write to the [i] position in the array and increment i each time.  As long as this is all done in the "rollup" transformation and not the "finalize" transformation, it will run the "initialize" portion before it moves to the next ID.

I have done it this way, but the Scan is easier.  I was doing a more simple rollup before I found that I needed cumulative intermediate results, so I just modified my existing ROLLUP.  Ab Initio documentation does not explain this technique in detail, but it can be done.  Let me know if you need more detail and I can provide a better example.

  
Login to rate this answer.

Use in built componenet in Abinitio .. "SCANWITHROLLUP"

Abhisek B
fresh as dew!!

  
Login to rate this answer.
anujaja

Answered On : Jan 27th, 2009

View all answers by anujaja

There are three ways
1) You can use Scan with rollup component
2) Use Rollup component
3) You can also use Scan followed by Dedup sort and select the last record. That will solve the purpose

Yes  1 User has rated as useful.
  
Login to rate this answer.

Other then scan, we can use rollup to do the cumulative summary.

  
Login to rate this answer.

We can use rollup component.

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.