Introduction to Mapping Specifications > Mapping Specification Example
  

Mapping Specification Example

As an analyst, you can develop business logic that can populate a target table with the current balance for each branch in a financial organization. You can export this business logic to PowerCenter to share it with a PowerCenter developer. You can export this business logic to a virtual table to run SQL queries against the data in the virtual table.
Use the following high-level steps to generate current balance data for active customer accounts for a set of financial products in the target table:
  1. 1. You can create a mapping specification named Customer_Data.
  2. 2. You can select customer tables for accounts and products and perform a normal join to display customer accounts that have purchased a financial product.
  3. 3. You want the target table in the mapping specification to have the same structure as the Current_Balance table that is in the Model repository. You can select the Current_Balance table as the target for the mapping specification when you create the mapping specification.
  4. 4. You want to view data for active accounts in the mapping specification. You can add a simple filter to the mapping specification to hide the inactive accounts and display the active accounts. You can add the following simple filter condition:
  5. Customer_Accounts.Status = 'Active'
  6. 5. You can preview the data in the mapping specification. The data contains active customer accounts for the checking, savings, and money market product categories. You want to view data for the savings and money market product categories. You can collaborate with a developer to create an advanced filter for the mapping specification. The mapping specification appears as a logical data object in the Developer tool. The developer copies the logical data object and edits it to add a filter condition that displays customer accounts for the savings and money market product categories. The developer adds the following advanced filter condition:
  7. Customer_Products.Category = 'Savings' OR Customer_Products.Category = 'Money_Market'
  8. 6. You can view the logical data object that contains the advanced filter condition as a logical data object in the Analyst tool. You can add it as a source to the mapping specification.
  9. 7. You can edit the Current_Balance target table to add a rule that sums the balances from the savings and money market product categories.
  10. 8. You can preview the data in the mapping specification and load the results of the mapping specification to a target table that matches the structure of the Current_Balance target table in the mapping specification.
  11. 9. You can choose to export the mapping specification logic to PowerCenter. You can select a target in the Model repository to share the mapping specification logic with a PowerCenter developer.
  12. 10. You can choose to export the mapping specification logic as a virtual table that appears in a virtual database in the Administrator tool. You can run SQL queries against the data in the virtual table.