GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Data Warehousing  >  Abinitio
Go To First  |  Previous Question  |  Next Question 
 Abinitio  |  Question 188 of 196    Print  
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?



  
Total Answers and Comments: 3 Last Update: January 27, 2009     Asked by: abinitio17 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
July 10, 2008 09:59:00   #1  
robmuza Member Since: July 2008   Contribution: 3    

RE: Cummulative summary in AB Initio

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.

 
Is this answer useful? Yes | No
October 10, 2008 03:37:56   #2  
abhi_fresh_as_dew Member Since: September 2008   Contribution: 12    

RE: Cummulative summary in AB Initio
Use in built componenet in Abinitio .. "SCANWITHROLLUP"

Abhisek B
fresh as dew!!

 
Is this answer useful? Yes | No
January 27, 2009 06:27:15   #3  
anujaja Member Since: July 2007   Contribution: 6    

RE: Cummulative summary in AB Initio
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

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape