プライマリ・コンテンツへ移動
Oracle® Hyperion Financial Data Quality Management, Enterprise Edition管理者ガイド

E79716-02
目次に移動
目次

前
次

マッピング・スクリプトのサンプル

このサンプル・マッピング・スクリプトは、勘定科目およびエンティティの列を評価し、ターゲット列の値を割り当てます。また、fdmResultマップを使用して現在の行の多の列を更新する方法も示します:

#----------------------------------------------------------------
# Sample Jython Mapping Script. Script evaluates account and entity
# columns and assign value for the target column. In addition it 
# also shows how to update the other columns of current row using
fdmResultMap
#------------------------------------------------------------------
account = fdmRow.getString("ACCOUNT")
entity = fdmRow.getString("UD1")
# Map based on account and dept column values
fdmResultMap["ATTR1"] = account + "-" + entity
if (account[0:2] == "71"):
  fdmResult = "7110"
elif (account[0:2] == "72"):
  fdmResult = "7210"
elif (account[0:2] == "77" and entity == "205"):
  fdmResult = "7710"
  fdmResultMap["AMOUNTX"] = 0
else:
  fdmResult = "7310"
このサンプル・スクリプトでは、SQL CASE文を使用して、ターゲット列に割り当てられる値を条件付きで処理します。
#-------------------------------------------------------------------
# Sample SQL script. Script uses SQL CASE statement to conditionally
# process assign value for the target column. 
#-------------------------------------------------------------------
  CASE
    WHEN ACCOUNT LIKE '61%'    AND ud1 = '205'    THEN '6110'
    WHEN ACCOUNT LIKE '61%'    AND ud1 = '240'    THEN '6120'
    ELSE '6130'
END