This document describes an Informatica mapping that demonstrates how to use built-in functions to calculate moving sums and averages from a source data set. The mapping takes a data set containing dates and sales figures and uses functions like CUME, MOVINGSUM, and MOVINGAVG to populate cumulative totals, 2-day moving sums, and 3-day moving averages in the target output. The full mapping implementation and source file can be downloaded to replicate the solution.
This document describes an Informatica mapping that demonstrates how to use built-in functions to calculate moving sums and averages from a source data set. The mapping takes a data set containing dates and sales figures and uses functions like CUME, MOVINGSUM, and MOVINGAVG to populate cumulative totals, 2-day moving sums, and 3-day moving averages in the target output. The full mapping implementation and source file can be downloaded to replicate the solution.
This document describes an Informatica mapping that demonstrates how to use built-in functions to calculate moving sums and averages from a source data set. The mapping takes a data set containing dates and sales figures and uses functions like CUME, MOVINGSUM, and MOVINGAVG to populate cumulative totals, 2-day moving sums, and 3-day moving averages in the target output. The full mapping implementation and source file can be downloaded to replicate the solution.
Informatica Developer : Calculating Moving Sum Avg
Business Requirement: Informatica Developer mapping sample that demonstrates how to use inbuilt functions to calculate Cumulative totals, Moving Sum, Moving Avg. Solution URL: https://community.informatica.com/solutions/2345 Description: The transformation language contains valuable functions that make it easy for populating columns required for business reporting and analysis. CUME and similar functions (such as MOVINGAVG and MOVINGSUM) can simplify reporting by calculating running values. Implementation Details: The mapping uses the following file as source : Date Sales 12/1/2012 100 12/2/2012 90 12/3/2012 120 12/4/2012 70 12/5/2012 150 12/6/2012 60 12/7/2012 50 12/9/2012 100 12/10/2012 40
The inbuilt transformation functions are used to calculate cumulative total, 2-day Moving Sum, 3-day MovingAvg for the sales quantity to populate the following target structure.
Date Sales Cumulative_total MovingSum MovingAvg 2012-12-01 00:00:00 100 100
Steps to implement the solution: 1. Import mapping xml to the repository, select the appropriate folder from repository and resolve the conflicts by choosing suitable option. 2. Copy the source file Product.csv into < Informatica server > \tomcat\bin\source. 3. Open mapping in Informatica Developer, Observe the sorter transformation as shown below.
Observe the use of aggregate function in expression transformation as shown below.