Skip to main content

Oracle

How To: Oracle Hyperion FDMEE Import Scripts (Jython)

Oracle Hyperion Financial Data Quality Management, Enterprise Edition (FDMEE) allows the use of scripting in several locations:

  • Import
  • Event
  • Custom
  • Mapping

Scripting allows you to work with the incoming data fields and strings to modify them as needed before the data is processed. Use of scripting at different points will allow you to take a more complete control of the data you are processing. This is not always required but when it is it can be very useful.

Let’s take a look at Import scripting today. Import scripting is used in the Import Format to manipulate incoming data.  This data is presented to the script in 2 strings are in the variables strField and strRecord.  The value in strField is the string that in is the defined column used by the import format.  The value in strRecord is the entire record or row being processed by the Import Format.

In the following example, Entity uses an Import Script called Get_Entity.py

Import Scripts are stored in the Application Root Folder


In this case, the scripts will be saved into the directory D:\FDMData\PlanBud\Data\scripts\import

Common Jython String Manipulation Functions

Jython comes with a very robust set of functions to handle strings.  The following list contains some of the most common functions:
Jython starts counting Characters at 0 rather than 1.  We call that being Zero Relative.

Extract Beginning Characters

Get the first 4 characters of strField

  • def Parse_Account (strField, strRecord):
  • return strField[:4]

Based on the following file:

Oracle - Guide to Oracle Cloud: 5 Steps to Ensure a Successful Move to the Cloud
Guide to Oracle Cloud: 5 Steps to Ensure a Successful Move to the Cloud

Explore key considerations, integrating the cloud with legacy applications and challenges of current cloud implementations.

Get the Guide

The return would be “03_0” for line one.

Extract Middle Characters

Get the 6th through the 10 characters

  • def Parse_Account (strField, strRecord):
  • return strField[6:10]

The return would be “1010” for line one.

Extracting the End of the String

Get the last 4 characters of the Account field

  • def Parse_Account (strField, strRecord):
  • return strField [-4:]

The return would be “03_0” for line one.

Use the Split Function

Split the string by the underscore character “_”.

  • def Parse_Account (strField, strRecord):
  • seglist = strfield.split(“-“)
  • return seglist[0]


The return would be “03” for line one. If you wanted the second set of characters “00” you would just change the value for the return to “seglist[1]”.

upper()

Convert the string into all upper case characters.

  • def Parse_Description(strField, strRecord):
  • return strField.upper


The return would be “SALES DISCOUNT” for line one.

lower()

Convert the string into all lower case characters.

  • def Parse_Description(strField, strRecord):
  • return strField.lower


The return would be “sales discount” for line one.

replace()

Replace text values found in the string with new values specified.

  • def Parse_Description(strField, strRecord):
  • return strField.replace(“BOB”,”Big Orange Ball”

The return would be “Big Orange Ball” for the line six description.

concatenation

Concatenate several string values and return the result.

  • def Parse_Account (strField, strRecord):
  • seglist = strfield.split(“-“)
  • return seglist[0] + seglist[1] + seglist[2]

The return would be “00031010” for line one.

These string manipulations are some of the more common ones used with FDMEE and Import scripts.  In my next blog we will dive into more FDMEE scripting.

Thoughts on “How To: Oracle Hyperion FDMEE Import Scripts (Jython)”

  1. Very good post! Really helpful Thank you! I have a data file which is sending me Years as “FY20” and FDMEE gives me Invalid Period Error. I know it would run fine when I change it from FY20 to 2020 and run it since that is how it is defined in my Period Mapping. But my question is – Is there a way I can handle this in Import Format? Like for example If FY20 then 2020, if FY21 then 2021? Appreciate your response. Thank you!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Anthony Taliaferro

Anthony Taliaferro is A Senior Technical Consultant with Perficient's EPM practice. He is also an Oracle University certified instructor teaching ODI, FDMEE as well as the EPM installation and configuration classes.

More from this Author

Categories
Follow Us
TwitterLinkedinFacebookYoutubeInstagram