JAVA API List

Table 7-3 JAVA API List

API Description
BigDecimal getPOVLocation(BigDecimal pLoadId) Returns the Partition Key based on the LOADID.
BigDecimal getPOVCategory(BigDecimal pLoadId) Returns the Category Key based on the LOADID.
Date getPOVStartPeriod(BigDecimal pLoadId) Returns the Period Key of the start period based on the LOADID.
Date getPOVEndPeriod(BigDecimal pLoadId) Returns the Period Key of the end period based on the LOADID when loading a single period, and the start period and end period are the same.
executePLSQL

Executes a block of Procedural Language/Structured Query Language (PL/SQL) code. This API takes the following three parameters:

  • String—A valid block of PL/SQL code.

    The PL/SQL block must be enclosed within double quotes.

  • Object array—An input array of Java objects (e.g. String, BigDecimal) representing input parameters to the block of code.

    The object array is used to insert into the PL/SQL where there are place holders (question marks).

  • Boolean—whether to perform a commit or not

    The Boolean value is either True or False.

An example of how to execute the PL/SQL:

fdmAPI.executePLSQL("BEGIN dbms_stats.gather_table_stats(user,?,estimate_percent=>dbms_stats.auto_sample_size,force=>TRUE); END;", ["tDataSeg_T"], True);
getBatchJobDetails

The getBatchJobDetails returns the following column for each job submitted by the batch:

  • BATCH_ID

  • BATCH_NAME

  • APPLICATION_ID

  • BATCH_TYPE

  • BATCH_EXECUTION_MODE

  • BATCH_WAIT_TIMEOUT

  • USER_POV_PERIOD

  • OPEN_BATCH_FOLDER

  • PLAN_TYPE

  • FILENAME_SEPARATOR

  • BATCH_GROUP_ID

  • BEF_PROCESS_BATCH_SCRIPT

  • AFT_PROCESS_BATCH_SCRIPT

  • EXECUTION_DATE

  • EXECUTED_BY

  • LOADID

  • BATCH_LOADID

  • PARENT_BATCH_LOADID

  • PARTITIONKEY

  • CATKEY

  • START_PERIODKEY

  • END_PERIODKEY

  • IMPORT_FROM_SOURCE_FLAG

  • EXPORT_TO_TARGET_FLAG

  • RECALCULATE_FLAG

  • CHECK_FLAG

  • JOURNAL_FLAG

  • IMPORT_MODE

  • EXPORT_MODE

  • IMPGROUPKEY

  • PROCESS_NAME

  • RULE_TYPE

  • LOG_FILE

  • OUTPUT_FILE

  • EPM_ORACLE_INSTANCE

  • ODI_SESSION_NUMBER

  • STATUS

int executeDML(String query,Object[] parameters) Execute any DML Statement. Provide the query and parameter. The parameter is provided as a list.
logDB(String pEntityType, String pEntityName, int pLogSequence, String pLogMessage) Log messages to a database table AIF_PROCESS_LOGS.
logFatal(String pLogMessage) Log a message when a fatal error occurs. This message is displayed at all log levels.
logError(String pLogMessage) Log a message when an error occurs. This message is displayed at log level 2 or higher.
logWarn(String pLogMessage) Log a message when a warning condition error occurs. This message is displayed at log level 3 or higher.
logInfo(String pLogMessage) Log an informational message. This message is displayed at log level 4 or higher.
logDebug(String pLogMessage) Log a debug message. This message is displayed at log level 5.
Map getProcessStates(BigDecimal pLoadId)

Returns status of Workflow process.

Available statuses:

  • IMPSTATUS—Returns the status of the import process.

    A 0 status indicates that the process has not yet started, or the process failed. A 1 status indicates the process is successful.

  • VALSTATUS—Returns the status of validation process.

    A 0 status indicates that the process has not yet started, or the process failed. A 1 status indicates the process is successful.

  • EXPSTATUS—Returns the status of export process.

    A 0 status indicates that the process has not yet started, or the process failed. A 1 status indicates the process is successful.

  • CHKSTATUS—Returns the status of check process.

    A 0 status indicates that the process has not yet started, or the process failed. A 1 status indicates the process is successful.

  • PROCESSSTATUS—Returns the exact error code. The detail for the error code can be found in the tlogprocessstates table.

Map getPeriodDetail(Date pPeriodKey,String pApplicationName) //returns PERIODTARGET and YEARTARGET Returns the Target period mapping for a given Period key.
Object getCustomScriptParameterValue(BigDecimal pLoadId,String pParameterName) Returns the value for given custom script parameter name and loadID.
Object getCustomScriptParameterValue(String pParameterName) Returns the value for given custom script parameter name and context initialized loaded.
ResultSet getBatchDetails()

Returns batch definition information from AIF_BATCHES table.

The fields returned by getBatchDetails():

  • BATCH_ID

  • BATCH_NAME

  • APPLICATION_ID

  • BATCH_TYPE

  • BATCH_EXECUTION_MOD

ResultSet getBatchJobDetails(BigDecimal pLoadId) Retrieves error messages logged to the database table AIF_PROCESS_LOGS for the given loadid.
ResultSet getCategoryList()

Returns a list of Categories in a result set.

The fields returned by getCategoryList():

  • CATKEY

  • CATNAME

ResultSet getCheckEntityGroupList(BigDecimal pApplicationId) Returns a list of Check Groups in a result set.
ResultSet getCheckEntityForGroup(String pValGroupKey) Return a list of entities in a Check Group in a result set.
ResultSe tgetCheckEntityGroupList(BigDecimal pApplicationId) Return a list of Check Rule Groups in a result set.
ResultSet getCheckEntityForGroup Return a list of Check Rule Group rules in a result set.
ResultSet getCustomDBLog()

Retrieve error messages logged to the database table AIF_PROCESS_LOGS for the current process.

The fields returned by getCustomDBLog():

  • ENTITY_TYPE

  • ENTITY_NAME

  • LOG_SEQUENCE

ResultSet getCustomDBLog(BigDecimal pLoadId) Returns the log statements from DB for a given loadID.
ResultSet getCustomScriptParameters() Returns the list of custom script parameters in a result set for the context initialized loadID.
ResultSet getCustomScriptParameters(BigDecimal pLoadId) Returns the list of custom script parameters in a resultset for the given loadID.
ResultSet getPeriodList()

Returns a list of Periods in a result set.

The fields returned by getPeriodList():

  • PERIODKEY

  • PERIODDESC

ResultSet executeQuery(String query, Object[] parameters) Execute any SQL Query Statement. The query results are returned in a result set. Provide the query and parameter. The parameter is provided as a list.
ResultSet getImportFormatDetails(String pImpGroupKey)

Return the Import Format details in a result set based on the Import Format key.

The fields returned by getImportFormatDetails(String pImpGroupKey):

  • IMPGROUPKEY

  • IMPGROUPDESC

  • IMPGROUPFILETYPE

  • IMPGROUPDELIMITER

  • IMPGROUPTYPE

  • IMPSOURCESYSTEMID

  • IMPSOURCELEDGERID

  • IMPSOURCECOAID

  • IMPTARGETAPPLICATIONID

  • IMPADAPTERID

  • IMPDRILLURLID

  • IMPODISCENARIO

  • IMPREGENSCEN

  • IMPDRILLREQUESTMETHOD

  • IMPDRILLURL

  • IMPTARGETSOURCESYSTEMID

ResultSet getImportFormatMapDetails(String pImpGroupKey)

Return the Import Format Mapping details in a result set for a given Import Format key. This currently supports only file-based import formats.

The fields returned by getImportFormatMapDetails(String pImpGroupKey):

  • IMPSEQ

  • IMPGROUPKEY

  • IMPFLDFIELDNAME

  • IMPFLDFIXEDTEXT

  • IMPFLDSTARTPOS

  • IMPFLDLENGTH

  • IMPFLDSOURCECOLNAME

ResultSet getLocationDetails(BigDecimal pPartitionKey)

Return the Location details in a record set for a given Location key.

The fields returned by getLocationDetails:

  • PARTITIONKEY

  • PARTNAME

  • PARTDESC

  • PARTNOTES

  • PARTLASTIMPFILE

  • PARTLASTEXPFILE

  • PARTIMPGROUP

  • PARTLOGICGROUP

  • PARTVALGROUP

  • PARTVALENTGROUP

  • PARTCURRENCYKEY

  • PARTPARENT

  • PARTTYPE

  • PARTSEQMAP

  • PARTDATAVALUE

  • PARTSEGMENTKEY

  • PARTCONTROLSTYPE

  • PARTCONTROLSGROUP1

  • PARTCONTROLSGROUP2

  • PARTCONTROLSAPPROVER

  • PARTCONTROLSAPPROVERPROXY

  • PARTCONTROLSREDFLAGLEVEL

  • PARTCLOGICGROUP

  • PARTINTGCONFIG1

  • PARTINTGCONFIG2

  • PARTINTGCONFIG3

  • PARTINTGCONFIG4

  • PARTADAPTOR

  • PARTSOURCESYSTEMID

  • PARTSOURCELEDGERID

  • PARTTARGETAPPLICATIONID

  • PARTPARENTKEY

  • PARTSOURCEAPPLICATIONID

  • PARTTARGETSOURCESYSTEMID

For example if you want to know the fields returned by the getLocationDetails API, run the following script:

rs = fdmAPI.getLocationDetails(fdmContext["LOCKEY"])
i = 1
metaData = rs.getMetaData()
while i <= metaData.getColumnCount():
  fdmAPI.logDebug(metaData.getColumnLabel(i))
  i +=1
ResultSet getRuleDetails(BigDecimal pRuleId)

Returns the Data Rule details in a record set for a given Data Rule ID.

The fields returned by getRuleDetails(BigDecimal pRuleId):

  • RULE_ID

  • SOURCE_SYSTEM_ID

  • SOURCE_LEDGER_ID

  • APPLICATION_ID

  • RULE_NAME

  • RULE_DESCRIPTION

  • PLAN_TYPE

  • LEDGER_GROUP

  • INCL_ZERO_BALANCE_FLAG

  • BALANCE_SELECTION

  • AMOUNT_TYPE

  • BALANCE_METHOD_CODE

  • BALANCE_TYPE

  • BAL_SEG_VALUE_OPTION_CODE

  • EXCHANGE_RATE_OPTION_CODE

  • EXCHANGE_BEGIN_RATE_TYPE

  • EXCHANGE_END_RATE_TYPE

  • EXCHANGE_AVERAGE_RATE_TYPE

  • DATA_SYNC_OBJECT

  • DATA_SYNC_OBJECT_ID

  • PARTCONTROLSAPPROVERPROXY

  • PARTCONTROLSREDFLAGLEVEL

  • STATUS

  • PARTITIONKEY

  • CATKEY

  • INCLUDE_ADJ_PERIODS_FLAG

  • BALANCE_AMOUNT_BS

  • BALANCE_AMOUNT_IS

  • AS_OF_DATE

  • BLANK_PERIODKEY

  • BR_MEMBER_NAME

  • BR_MEMBER_DISP_NAME

  • CALENDAR_ID

  • CURRENCY_CODE

  • DP_MEMBER_NAME

  • FILE_NAME_DATE_FORMAT

  • FILE_NAME_STATIC

  • FILE_NAME_SUFFIX_TYPE

  • FILE_PATH

  • LEDGER_GROUP_ID

  • PERIOD_MAPPING_TYPE

  • VERSION

  • SIGNAGE_METHOD

  • DIRECT_FILE_LOAD_FLAG

  • LOAD_OPTIONS

  • RULE_ATTR1

  • RULE_ATTR2

  • RULE_ATTR3

  • RULE_ATTR4

  • ICP_LOAD

  • MULTI_PERIOD_FILE_FLAG

  • IMPGROUPKEY

  • SOURCE_APP_PLAN_TYPE

showCustomDBLog() Show a list of custom messages in the user interface after completion of a process. Message can be displayed at the end of a data load workflow step like import, validate, export, check or at the end of a custom script execution. Note messages are displayed only when the process are run in online mode.
showCustomFile(String filePath) Show a custom file (log file, report file) in the user interface after completion of a process. Message can be displayed at the end of a data load workflow step like import, validate, export, check or at the end of a custom script execution. Note messages are displayed only when the process are run in online mode.
showCustomMessage(String message) Show a custom message in the user interface after completion of a process. Message can be displayed at the end of a data load workflow step like import, validate, export, check or at the end of a custom script execution. Note messages are displayed only when the process are run in online mode.
String getCategoryMap(BigDecimal pCatKey,String pApplicationName) Returns the Scenario for a given Category and Application Name.
String getCustomMessage() Retrieves the last custom message raised for the current process.
String getCustomMessage(BigDecimal pLoadId) Retrieves the last custom message raised for the given loadid.
String getCustomFile() Retrieves the custom file created for the current process.
String getCustomFile(BigDecimal pLoadId) Retrieves the custom file created for the given loadid.
String getPOVDataValue(BigDecimal pPartitionKey) Returns the data value of the Location.
String getDirTopLevel(BigDecimal pApplicationId) Returns the top-level directory based on the Application.
String getDirInbox(BigDecimal pApplicationId) Returns the Inbox directory based on the Application.
String getDirOutbox(BigDecimal pApplicationId) Returns the Outbox directory based on the Application.
String getDirScripts(BigDecimal pApplicationId) Returns the Scripts directory based on the Application.
String getProfileOptionValue(String pProfileOptionName, BigDecimal pApplicationId, String pUserName) Returns the value set for an option. Options can be set at the System Setting, Application Setting, and User Setting. The order of precedence is: User, Application, and System. The API determines the appropriate applicable value and returns the value.
void writeToProcessLogsDB(BigDecimal pLoadId, String pEntityType, String pEntityName, int pLogSequence,String pLogMessage) Writes the log information to the AIF_PROCESS_LOGS table. Use Entity Type and Entity Name to group the logged messages. Logs can be created only from a data load workflow process.
void writeToProcessLogsFile(BigDecimal pLoadId, String pLogMessage)

Writes the log information to the Data Load Process log file. The logs is written based on the process log level. Logs can be created only from a data load workflow process.

Note:

It is recommended that you use the logging API, for example logDebug or, logInfo API, instead of using the writeToProcessLogsFile API.

void closeConnection() Use to close the database connection.
void closeResultSet(ResultSet resultSet) Use to close result object.
void updateImportFormat(String pImpgroupKey,BigDecimal pLoadId) Update the import format for the current run. This is applicable only for File-based import formats.