Oracle Bi Solutions

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Saturday, 22 June 2013

Informatica - Aggregate Transformation

Posted on 00:38 by Unknown
  • Connected and Active Transformation
  • The Aggregator transformation allows us to perform aggregate calculations, such as averages and sums.
  • Aggregator transformation allows us to perform calculations on groups.

Components of the Aggregator Transformation 
1.   Aggregate expression 
2.   Group by port 
3.   Sorted Input 
4.   Aggregate cache
1) Aggregate Expressions
  • Entered in an output port.
  • Can include non-aggregate expressions and conditional clauses.
The transformation language includes the following aggregate functions:
  • AVG, COUNT, MAX, MIN, SUM
  • FIRST, LAST
  • MEDIAN, PERCENTILE, STDDEV, VARIANCE

Single Level Aggregate Function: MAX(SAL) 
Nested Aggregate Function: MAX( COUNT( ITEM ))

Nested Aggregate Functions
  • In Aggregator transformation, there can be multiple single level functions or multiple nested functions.
  • An Aggregator transformation cannot have both types of functions together.
  • MAX( COUNT( ITEM )) is correct.
  • MIN(MAX( COUNT( ITEM ))) is not correct. It can also include one aggregate function nested within another aggregate function

Conditional Clauses 
We can use conditional clauses in the aggregate expression to reduce the number of rows used in the aggregation. The conditional clause can be any clause that evaluates to TRUE or FALSE.
  • SUM( COMMISSION, COMMISSION > QUOTA )
Non-Aggregate Functions 
We can also use non-aggregate functions in the aggregate expression.
  • IIF( MAX( QUANTITY ) > 0, MAX( QUANTITY ), 0))
2) Group By Ports
  • Indicates how to create groups.
  • When grouping data, the Aggregator transformation outputs the last row of each group unless otherwise specified.

The Aggregator transformation allows us to define groups for aggregations, rather than performing the aggregation across all input data.
For example, we can find Maximum Salary for every Department.
  • In Aggregator Transformation, Open Ports tab and select Group By as needed.

3) Using Sorted Input 
  • Use to improve session performance.
  • To use sorted input, we must pass data to the Aggregator transformation sorted by group by port, in ascending or descending order.
  • When we use this option, we tell Aggregator that data coming to it is already sorted.
  • We check the Sorted Input Option in Properties Tab of the transformation.
  • If the option is checked but we are not passing sorted data to the transformation, then the session fails.

4) Aggregator Caches 
  • The Power Center Server stores data in the aggregate cache until it completes Aggregate calculations.
  • It stores group values in an index cache and row data in the data cache. If the Power Center Server requires more space, it stores overflow values in cache files.

Note: The Power Center Server uses memory to process an Aggregator transformation with sorted ports. It does not use cache memory. We do not need to configure cache memory for Aggregator transformations that use sorted ports.
1) Aggregator Index Cache:
The index cache holds group information from the group by ports. If we are using Group By on DEPTNO, then this cache stores values 10, 20, 30 etc.
  • All Group By Columns are in AGGREGATOR INDEX CACHE. Ex. DEPTNO

2) Aggregator Data Cache: 
DATA CACHE is generally larger than the AGGREGATOR INDEX CACHE.
Columns in Data Cache:
  • Variable ports if any
  • Non group by input/output ports.
  • Non group by input ports used in non-aggregate output expression.
  • Port containing aggregate function





1) Example: To calculate MAX, MIN, AVG and SUM of salary of EMP table. 
  • EMP will be source table.
  • Create a target table EMP_AGG_EXAMPLE in target designer. Table should contain DEPTNO, MAX_SAL, MIN_SAL, AVG_SAL and SUM_SAL
  • Create the shortcuts in your folder.
Creating Mapping:
1. Open folder where we want to create the mapping. 
2. Click Tools -> Mapping Designer. 
3. Click Mapping-> Create-> Give mapping name. Ex: m_agg_example 
4. Drag EMP from source in mapping. 
5. Click Transformation -> Create -> Select AGGREGATOR from list. Give name and click Create. Now click done. 
6. Pass SAL and DEPTNO only from SQ_EMP to AGGREGATOR Transformation. 
7. Edit AGGREGATOR Transformation. Go to Ports Tab
8. Create 4 output ports: OUT_MAX_SAL, OUT_MIN_SAL, OUT_AVG_SAL,
OUT_SUM_SAL 
9. Open Expression Editor one by one for all output ports and give the
calculations. Ex: MAX(SAL), MIN(SAL), AVG(SAL),SUM(SAL) 
10. Click Apply -> Ok. 
11. Drag target table now. 
12. Connect the output ports from Rank to target table. 
13. Click Mapping -> Validate 
14. Repository -> Save 
  • Create Session and Workflow as described earlier. Run the Workflow and see the data in target table.
  • Make sure to give connection information for all tables.

Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in Informatica | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Upper Function
    In Oracle/PLSQL, the  upper function  converts all letters in the specified string to uppercase. If there are characters in the string that ...
  • OBIEE 11g Hide/Show Sections based on Dashboard Prompt
    allow a user’s interaction to hide/show certain sections of a dashboard. In this particular case the user wanted to choose either ‘Quarterly...
  • [OBIEE11g] - OBIEE Dashboard for Informatica Metadata Reporting
    The metadata that Informatica Power Center 8 retains in its repository can be exposed via OBIEE reports and dashboards. This metadata includ...
  • [ODI] - Frequently Asked Questions (FAQ)
    Here is a list of FAQs about Oracle Data Integrator 1) What is Oracle Data Integrator (ODI)? 2) What is E-LT? 3) What components make up Ora...
  • OBIEE 11g not showing new dashboard in the drop down menu
    When creating New dashboard in  OBIEE 11g, I have faced with issue that dashboard name did not show up in drop down dashboard menu. 1. When ...
  • Data Modeling: Schema Generation Issue with ERwin Data Modeler 7.3
    We are using Computer Associate’s ERwin Data Modeler 7.3 for data modeling. In one of our engagements, we are pushing data model changes to ...
  • Installation Informatica Powercenter 9.1 on Oracle Enterprise Linux 5.6
    Ingredients: Program Version Filename Oracle Express 11G 11.2.0 oracle-xe-11.2.0-0.5.x86_64.rpm SQL Developer 3.0 sqldeveloper-3.0.04.34-1.n...
  • Informatica Powercenter Workflow Manager Repository Navigator docking float issue
    In case you’re also experiencing where your Repository Navigator is not dock or attached and it seems just floating within Workflow Manager ...
  • [OBIEE11g] - Creating Dashboard Traversing Through Graph
    The general requirement asked for by customers is that they want to Click on the Main Dashboard Page’s Graph and be transferred to the other...
  • OBIEE 11g - Query Limit
    Query limit and number of minutes a query can run per physical layer database connection, follow the below steps. > Login to Repository u...

Categories

  • BI Publisher
  • DAC
  • DataWarehouse
  • Hyperion
  • Informatica
  • OBIEE
  • ODI
  • Oracle Applications EBS 12.1.3
  • Oracle Database
  • PL/SQL
  • SQL
  • Unix/Linux

Blog Archive

  • ▼  2013 (500)
    • ►  November (8)
    • ►  October (1)
    • ►  July (4)
    • ▼  June (9)
      • OBIEE 11g - Application Roles Migration from Dev T...
      • Informatica - Aggregate Transformation
      • Informatica - Source Qualifier Transformation
      • Informatica - SQL Transformation
      • Informatica - Update Strategy Transformation
      • Informatica - Union Transformation
      • Informatica - Joiner Transformation
      • Informatica - Lookup Transformation
      • OBIEE 11g - Adding Custom URLs to the Dashboard
    • ►  May (15)
    • ►  April (24)
    • ►  March (43)
    • ►  February (73)
    • ►  January (323)
Powered by Blogger.

About Me

Unknown
View my complete profile