Se ha denunciado esta presentación.
Se está descargando tu SlideShare. ×

FDMEE script examples

Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
www.bispsolutions.com www.bisptrainings.com
2017
BISP Solutions Inc.
Ashima Rajput
[FDMEE WRITING IMPORT AND MAPPING SCRIP...
Contents
 Overview of Scripts
 Exercise#1 Import script with string expression.
 Exercise#2 Import Script with conditio...
Types of Scripts in FDMEE
I. Import scripts
II. Mapping scripts
III. Event scripts
IV. Custom scripts
I. Import scripts: I...
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Próximo SlideShare
FDMEE script examples
FDMEE script examples
Cargando en…3
×

Eche un vistazo a continuación

1 de 51 Anuncio

Más Contenido Relacionado

Presentaciones para usted (20)

Similares a FDMEE script examples (20)

Anuncio

Más de Amit Sharma (20)

Más reciente (20)

Anuncio

FDMEE script examples

  1. 1. www.bispsolutions.com www.bisptrainings.com 2017 BISP Solutions Inc. Ashima Rajput [FDMEE WRITING IMPORT AND MAPPING SCRIPT] This document provides various examples as to how to use import and mapping script. There are four examples used in it, they provide various ways to apply import and mapping scripts.
  2. 2. Contents  Overview of Scripts  Exercise#1 Import script with string expression.  Exercise#2 Import Script with conditional expression.  Exercise#3 Mapping Script with IGNORE expression.  Exercise#4 Import Script with StrRecord Function Overview of Scripts: Oracle Hyperion Financial Data Quality Management, Enterprise Edition having great power and strength because of extensive framework by offering Jython and Visual Basic scripting so that user has wider area for customize the product which is well suited for their needs. There are instances when source data not in the same format as required by target application therefore some changes and data massaging is required with data. With Jython or VB script, data massaging job turns out to be quite flexible. Jython script empowers developers to customize the source data to the greatest extent. i.e There are two amount columns in our Source File, one for credit amount and other for debit amount, so we need to convert two columns into one based on condition Amount=debit-credit. Script Editor: With the help of script Editor, we write Jython script in FDMEE. Scripts are saved with .py extension. Every script saved under scripts folder. Scripts can be copied into other FDMEE environments and one can edit scripts using text Editor. How to Launch Script Editor Setup -scripts -- script Editor Fig 1.1 Script Editor
  3. 3. Types of Scripts in FDMEE I. Import scripts II. Mapping scripts III. Event scripts IV. Custom scripts I. Import scripts: Import script only supported by Jython script, so far visual basic script not supported. These scripts support only file-based data loads. One can use any Jython functions with Import scripts. Note file name of Import script and function Name should be same. For our flexibility we always write script in text editor than paste it into FDMEE editor. When source files are successfully imported than Import scripts will be executed. These scripts not supported LCM in FDMEE. Function passes two parameters.  First parameter takes dimension value defined by the import format.  In other parameter it takes entire record from the source. Exercise#1 In this Example, the account column is a complete string i.e 01-205-A0065-0000-000 and we need to apply string split function in order to extract certain subset of the string. Input String : 01-205-A0065-0000-000 Expected Output: Account: A0065 Source: file(SCRIPT1Dl.TXT) Target: drcrLoad Script type: Import script Sample Data file. 1. Login to workspace and open FDMEE. Navigate -Administer -- Data Management
  4. 4. 2.Go to setup tab Register Source system. SetupRegister-source system Here you can see File (source system) is already registered. If you want to register any other source simply click on plus icon and you can add here. For add new Source system: SetupRegister-source system-add Provide name for source system, select source system likewise fill other details than save it.
  5. 5. 3.Go to setup tab Register Target Application. SetupRegister-Target Application Here you can see some of the Target applications are already registered. My Target Application name is DrcrLoad. If you want to register any other Target, simply click on plus icon and you can add here. For add new Target application. SetupRegister- Target application -add Click on add, select application window will appear, from dropdown select Type of Target application, name of application will appear ,select one of them click on ok.
  6. 6. Dimension mapping details populated automatically, this refers to staging table. Market, Product, Customers, Entity, are generic dimension. Account is Account Type and Market is country dimension. 4. Now in next step, define import format, we define source data type which we want to load to target application. Setup - Integration Setup
  7. 7. Setup - Integration Setup Import Format If Import format not present in list than add it by click on add button, you will have option below to add new import format, fill all the details like Name of import format than source Type, Source File etc. File Type Delimited means your source file contains which type of delimiter in my case it is comma. Click on save than need to define Mapping Type.
  8. 8. Here define mapping based on your source File provide source column name, and Field Number of source. For Ex in my Source file account number 01-205-A0065-0000-000 is First field so you can view in Import format Account Map with field number 1 . This is my Source file. 5. Now we write script. Setup-Scripts--Script Editor---Import Here select your Target Application as drcrload, and Technology as Jython.
  9. 9. For creating new script. Setup-Scripts--Script Editor---Import---New Script Name and function definition should be exactly same. Function takes two parameters, field name and record name. Parameter#1 strfield contains whole record as row from your file and strrec contains value for dimension on which we are applying script, i.e here we have Account. So in script we give condition if strfield contain “–“ more than zero times than need to split the field and store into seglist array. Now in next step we want third string A0065 so we pass second index (remember index start from zero) of seglist and store it into new variable result and return it into account.
  10. 10. Script This is the one way of writing script for this problem. and below script can also use for same problem. Now we give reference of this script into Import Format. Click on Account and select pencil Icon under add expression over their click on it. Choose Expression Type as script, select Expression value. Click ok, then save it.
  11. 11. 6.Location: Once we define Import Format define Location Here if location not available in list than click on add button and fill related details. Setup - Integration Setup Location To Specify new Location, give any name to Location provide Import Format Name which you gave in last step once you provide Import format system automatically fetch all other details related to source and Target. Then click on save. 7. Period Mapping: suppose we want to load data for Jan 2016 so we can specify this into Period mapping. Period mapping is used to map source data(File) to Target dimension which is period dimension. we can define mapping at different levels like Global, Application, source system. Setup - Integration Setup Period Mapping
  12. 12. 8.Category Mapping: If category exist under category list which you want to load into target dimension than select it or otherwise create them. Setup - Integration Setup Category Mapping For creating New click on add provide source system data to Target Scenario dimension member. 9.we need to set Data Load Mapping. but first select POV (Point of view).
  13. 13. Data Load: In this Part of FDMEE We will see process of Data Load and validation of data and finally how we export data from ERP to EPM system. Data Load Data Load Mapping: We use Data Load Mapping for map source dimension member to their target Application Dimension member. We have Location, Period, Category set of Mappings for Data Load Mapping. For that we need to select for which member we want to load data like in my case I choose Account as a dimension than we have types of Mapping choose one of them then click on add then fill all details. We need to specify mapping for each dimension. Setup - Data Load -- Data Load Mapping Dimension- Account Dimension- Customers
  14. 14. Dimension- Market Dimension- Entity Dimension- ICP
  15. 15. Dimension- Product 10. Data Load Rule: We need to create data Load rule for location and category to describe what we are going to import from ERP system. For prepare Data Load Rule click on plus icon Fill all the details like provide any suitable Name to your Data Load Rule, Choose File Type here we are loading data for single period. Than choose Import Format which you Prepared. After that in Source Option select File Name Which you want to Load. Workflow -- Data Load - Data Load Rule Basically, data load rule represents our file which we want to import with other details once we complete data load rule we need to save it so execute button enabled than click on it here Execute
  16. 16. rule window will appear here we need to specify one or more periods. Run it than you will see one process id has created than verify it by click on save 11. Data Load Workbench Here we can see our data successfully Loaded. We can see in Target Account A0065 is loaded successfully. Data for other dimension loaded.
  17. 17. Excel output Exercise#2 : The 2nd exercise demonstrate string function, type case and conditional expression. We get source file which has two amount columns, one for credit amount and other for debit amount, so we need to store Amount as Amount=Debit-credit which means convert two Amount columns into one column. Expected Output: Amount: Amount for A00065 will be 340, Amount for A00066 will be 200.and for A0067 will be 15. Source system-File (MULTIdata.txt). Target system-Essbase cube(Mul_peri-Mul_db). Script type: Import script
  18. 18. 1.In First step we login to workspace and open FDMEE. Navigate -Administer -- Data Management 2.Go to setup tab Register Source system. SetupRegister-source system. Here you can see File (source system) is registered already. If you want to register any other source simply click on plus icon and you can add here. For add new Source system: SetupRegister-source system-add Provide name for source system, select source system likewise fill other details than save it. 3.Go to setup tab Register Target Application. SetupRegister-Target Application
  19. 19. Here you can see some of the Target application is registered already. My Target Application name is Mul_peri-Mul_db. If you want to register any other Target, simply click on plus icon and you can add here. For add new Target application. SetupRegister- Target application -add Click on add than window will appear, from dropdown select Type of Target application, then Name of application will appear select one of them click on ok. Here you can see all the details comes automatically related to dimension mapping this refers to staging table. Market, Product, Customers, Entity, ICP are generic dimension and Account is Account Type dimension. You can view in detail in your Target application by seeing dimension type. These all sets automatically.
  20. 20. 4.Now in next step define import format here we define map to source. We also define script in Import format. Setup - Integration Setup
  21. 21. My import format present in list name as Multi_IF. Setup - Integration Setup Import Format If Import format not present in list than add it by click on add button you will have option below to add new import format fill all the details like Name of import format than source Type, Source File etc. File Type Delimited means your source file contains which type of delimiter in my case it is comma. Click on save than need to define Mapping Type. Here define Mapping based in your source File provide Source column name than Field Number of source.
  22. 22. 5.Now we write Import script. Setup-Scripts--Script Editor---Import Here select your Target Application and Technology as Jython. For creating new script. Setup-Scripts--Script Editor---Import---New Script Name and definition of function should be exactly same. Function takes two parameters field name, record Name. strRecord contains full data record means, string record contains full value of a row.so when we use split function with strRecord so we can get credit value. remember index start from zero.so credit Amount present on 7th index.
  23. 23. Import format we define Amount field as debit amount so strfield contain record which is present in Amount in import format like in our case Amount present on 9th field in Import format. Now we need to apply condition for Amount field. . Here our logic was very simple if debit amount is zero than amount will be negative if credit is not zero, and if credit is zero than amount should remain same as debit. and if in case debit credit both contains some value in this case Amount=debit-credit. Script Now we give reference of this script into Import Format. this script we written for Amount dimension so, click on Amount and you can see pencil Icon under add expression over their click on it. choose Expression Type as script. Than select Expression value. Click ok, then save it.
  24. 24. 6.Location: Once we define Import Format define Location Here if location not available in list than click on add button and fill related details. Setup - Integration Setup Location To Specify new Location, give any name to Location provide Import Format Name which you gave in last step once you provide Import format system automatically fetch all other details related to source and Target. Then click on save. 7.Period Mapping: suppose we want to load data for Jan 2016 so we can specify this into Period mapping. Period mapping is used to map source data(File) to Target dimension which is period dimension. we can define mapping at different levels like Global, Application, source system. Setup - Integration Setup Period Mapping
  25. 25. 8.Category Mapping: If category exist under category list which you want to load into target dimension than select it or otherwise create them. Setup - Integration Setup Category Mapping For creating New click on add provide source system data to Target Scenario dimension member. 9.we need to set Data Load Mapping. but first select POV (Point of view). Data Load: In this Part of FDMEE We will see process of Data Load and validation of data and finally how we export data from ERP to EPM system. Data Load Data Load Mapping: We use Data Load Mapping for map source dimension member to their target Application Dimension member. We have Account, customer, Entity, ICP, market, Product. set of Mappings for Data Load Mapping. For that we need to select for which member we want to load data like in my case I choose Account as a dimension than we have types of Mapping choose one of them then click on add then fill all details. We need to specify mapping for each dimension. Setup - Data Load -- Data Load Mapping Dimension- Account
  26. 26. Dimension- Customers Dimension- Market Dimension- Entity
  27. 27. Dimension- ICP Dimension- Product 10.Data Load Rule: We need to create data Load rule for location and category to describe what we are going to import from ERP system. For prepare Data Load Rule click on plus icon Fill all the details like provide any suitable Name to your Data Load Rule, Choose File Type here we are loading data for single period. Than choose Import Format which you Prepared. After that in Source Option select File Name Which you want to Load. Workflow -- Data Load - Data Load Rule
  28. 28. Basically, data load rule represents our file which we want to import with other details once we complete data load rule we need to save it so execute button enabled than click on it here Execute rule window will appear here we need to specify one or more periods. Run it than you will see one process id has created than verify it by click on save 11.Data Load Workbench Here we can see our data successfully Loaded. View in Amount column.
  29. 29. Workbench output Excel output II. Mapping Script
  30. 30. This type of scripting generally we use when we want to apply conditional Mapping. In these scripts source members directly not going to map with Target members, first we map source members to script expression than it maps to target. Mapping script written with dimension Mapping. We use if ..then logic for conditional mapping. Mapping script not supported Explicit and Multi-dimension mapping. How to create. Workflow-Data Load Mapping-Like tab-Choose Dimension--select source value-Target value write #SCRIPT. 1.Mapping Script Example: Exercise#3 Here in this Example we skip those lines where amount is less than Zero with "IGNORE "option else map all with Account members for target. Expected output: Write IGNORE with less than zero Amount in Account column. Source system: dataload1.txt Target system: sample-Basic Mapping Type: Mapping Script Source file: 1.In First step we login to workspace and open FDMEE. Navigate -Administer -- Data Management 2.Go to setup tab Register Source system.
  31. 31. SetupRegister-source system Here you can see File (source system) is registered already. If you want to register any other source simply click on plus icon and you can add here. For add new Source system: SetupRegister-source system-add Provide name for source system, select source system likewise fill other details than save it. 3.Go to setup tab Register Target Application. SetupRegister-Target Application
  32. 32. Here you can see some of the Target application is registered already. My Target Application name is Sample-Basic. If you want to register any other Target, simply click on plus icon and you can add here. For add new Target application. SetupRegister- Target application -add Click on add than window will appear, from dropdown select Type of Target application, then Name of application will appear select one of them click on ok. Here you can see all the details comes automatically related to dimension mapping this refers to staging table. Market, Product, Scenario are generic dimension and Year is Period Type and Measures is Account dimension. You can view in detail in your Target application by seeing dimension type. These all sets automatically. 4Now in next step define import format here we define map fields to source to Target.
  33. 33. Setup - Integration Setup Setup - Integration Setup Import Format If Import format not present in list than add it by click on add button you will have option below to add new import format fill all the details like Name of import format than source Type, Source File etc. File Type Delimited means your source file contains which type of delimiter in my case it is comma. Click on save than need to define Mapping Type.
  34. 34. Here define Mapping based on your source File provide Source column name than Field Number of source. 5.Location: Once we define Import Format define Location Here if location not available in list than click on add button and fill related details. Setup - Integration Setup Location To Specify new Location, give any name to Location provide Import Format Name which you gave in last step once you provide Import format system automatically fetch all other details related to source and Target. Then click on save. 6.Period Mapping: suppose we want to load data for Jan 2012 so we can specify this into Period mapping. Period mapping is used to map source data(File) to Target dimension which is period dimension. we can define mapping at different levels like Global, Application, source system. Setup - Integration Setup Period Mapping
  35. 35. 7.Category Mapping: If category exist under category list which you want to load into target dimension than select it or otherwise create them. Setup - Integration Setup Category Mapping For creating New click on add provide source system data to Target Scenario dimension member. Data Load: In this Part of FDMEE We will see process of Data Load and validation of data and finally how we export data from ERP to EPM system. Data Load 8.Data Load Mapping Workflow-Setup - Data Load -- Data Load Mapping Than In workflow we set Data Load Mapping. for members like Market, Product, Scenario we map simply without script with like mapping all source goes to all target. but for Measures we write script, so that all source mapped with target based on conditional mapping. We write #SCRIPT keyword for Jython script in place of Target value and #SQL for sql scripts. WorkflowData Load Mapping-select Measures
  36. 36. When we write #SCRIPT in Target value script editor will be enabled for us here we write script, this is recommended that first write script in notepad than copy it and paste into script editor. then save it. This is our script fdmRow is used to get column value of current row in our script our column name is Account .so when mapping is processed it return column value. fdmResult returns the updated value for the target dimension. If amount less than zero than it return IGNORE or else it return amount to the function. Map all remaining dimensions. Dimension- Measures Here we also write script for Measures.
  37. 37. Dimension- Market Dimension- Product 9.we need to set Data Load Mapping. but first select POV (Point of view).
  38. 38. 10.Data Load Rule: We need to create data Load rule for location and category to describe what we are going to import from ERP system. For prepare Data Load Rule click on plus icon Fill all the details like provide any suitable Name to your Data Load Rule, Choose File Type here we are loading data for single period. Than choose Import Format which you Prepared. After that in Source Option select File Name Which you want to Load. Workflow -- Data Load - Data Load Rule 11.Data Load Workbench
  39. 39. Here we can see our data successfully Loaded. We can see in Target Measures “IGNORE” loaded for amount -20 because it is less than Zero. For other sales loaded. Excel output See in California there is no data loaded because amount was less than zero. Problem 4: In my File Measures dimension contain dimension member with some appended text, here we need to eliminate appended text so that only dimension member will be loaded into Target application. For ex file contains sales_10 in measures dimension, so we need to eliminate -10 through Import Script. Expected output: sales from sales-10. Target Application: Sample-Basic File Name: Removeextra.txt
  40. 40. Script Type: Import Script Ex. Step by step process of writing Import Script: - 1.In First step we login to workspace and open FDMEE. Navigate -Administer -- Data Management 2.Go to setup tab Register Source system. SetupRegister-source system
  41. 41. Here you can see File (source system) is registered already. If you want to register any other source simply click on plus icon and you can add here. For add new Source system: SetupRegister-source system-add Provide name for source system, select source system likewise fill other details than save it. 3.Go to setup tab Register Target Application. SetupRegister-Target Application Here you can see some of the Target application is registered already. My Target Application name is sample-Basic If you want to register any other Target, simply click on plus icon and you can add here. For add new Target application. SetupRegister- Target application -add Click on add than window will appear, from dropdown select Type of Target application, then Name of application will appear select one of them click on ok.
  42. 42. Here you can see all the details comes automatically related to dimension mapping this refers to staging table. Market, Product, Scenario are generic dimension and Measures is Account Type and Year is Period dimension. You can view in detail in your Target application by seeing dimension type. 4.Now in next step define import format here we define map to source. We also define script in Import format. Setup - Integration Setup
  43. 43. Setup - Integration Setup Import Format If Import format not present in list than add it by click on add button you will have option below to add new import format fill all the details like Name of import format than source Type, Source File etc. File Type Delimited means your source file contains which type of delimiter in my case it is comma. Click on save than need to define Mapping Type. Here define Mapping based in your source File provide Source column name than Field Number of source.
  44. 44. 5.Now we write script. Setup-Scripts--Script Editor---Import Here select your Target Application as Sample-Basic, and Technology as Jython. For creating new script. Setup-Scripts--Script Editor---Import---New Script Name and definition of function should be exactly same. Function takes two parameters field name, record Name. FDMEE takes data as series of characters from file and character index starts from zero. Now we need to identify in our source file from where we need to start and what will be the end point we need to read characters, like in our case sales index is sales [0:5], rest of the character of this dimension we need to ignore. It represents range of character, it takes sales_10 as input and return sales.
  45. 45. Script Now we give reference of this script into Import Format. this script we written for Measures dimension so, click on Measures and you can see pencil Icon under add expression over their click on it. choose Expression Type as script. Than select Expression value. Click ok, then save it. 6.Location: Once we define Import Format define Location Here if location not available in list than click on add button and fill related details. Setup - Integration Setup Location
  46. 46. To Specify new Location, give any name to Location provide Import Format Name which you gave in last step once you provide Import format system automatically fetch all other details related to source and Target. Then click on save. 7. Period Mapping: suppose we want to load data for Jan 2016 so we can specify this into Period mapping. Period mapping is used to map source data(File) to Target dimension which is period dimension(Sample-Basic). we can define mapping at different levels like Global, Application, source system. Setup - Integration Setup Period Mapping
  47. 47. 8.Category Mapping: If category exist under category list which you want to load into target dimension than select it or otherwise create them. Setup - Integration Setup Period Mapping For creating New click on add provide source system data to Target Scenario dimension member. 9.we need to set Data Load Mapping. but first select POV(Point of view). Data Load: In this Part of FDMEE We will see process of Data Load and validation of data and finally how we export data from ERP to EPM system
  48. 48. Data Load Data Load Mapping: We use Data Load Mapping for map source dimension member to their target Application Dimension member. We have Location, Period, Category set of Mappings for Data Load Mapping. For that we need to select for which member we want to load data like in my case I choose Product as a dimension than we have types of Mapping choose one of them then click on add then fill all details. We need to specify mapping for each dimension. Setup - Data Load -- Data Load Mapping Dimension- Product Dimension- Scenario Dimension- Market
  49. 49. Dimension- Measures 10.Data Load Rule: We need to create data Load rule for location and category to describe what we are going to import from ERP system. For prepare Data Load Rule click on plus icon Fill all the details like provide any suitable Name to your Data Load Rule, Choose File Type here we are loading data for single period. Than choose Import Format which you Prepared. After that in Source Option select File Name Which you want to Load. Workflow -- Data Load - Data Load Rule
  50. 50. Basically, data load rule represents our file which we want to import with other details once we complete data load rule we need to save it so execute button enabled than click on it here Execute rule window will appear here we need to specify one or more periods. Run it than you will see one process id has created than verify it by click on save 11.Data Load Workbench Here we can see our data successfully Loaded. We can see in Target measures sales appended value has eliminated. Workbench Output
  51. 51. Excel Output

×