Scenario 2: Import Data, Run a Calculation Script, and Copy Data from a Block Storage Database to an Aggregate Storage Database

In this scenario, you run a sequence of EPM Automate Utility commands to complete these steps. For detailed information, see Working with EPM Automate.

  • Sign on to the instance using these credentials. Substitute the service administrator user name, password, and identity domain of the service instance for the italicized placeholders here and in the EPM Automate Utility sample.

    • User name: USERNAME

    • Password file: C:/<Directory>/<fileName>.epw

      You need to create this file manually. See the encrypt command in Command Reference in Working with EPM Automate for Oracle Enterprise Performance Management Cloud .

    • URL: /https://<SERVICE_NAME>-<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com

    • Identity Domain: IDENTITYDOMAIN

  • Upload a file data.csv.

  • Import data from data.csv into the application using job loadingq1data.

  • Refresh the cube.

  • Run business rule RevenueAllocation deployed to plan type RollupUSSales with runtime prompts Quarter=Q1Entity=USA to transform data.

  • Push data to an aggregate storage database using job CampaignToReporting.

  • Log out.

Example 2-5 EPM Automate

epmautomate login usernamepassword https://<SERVICE_NAME>-<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com
identitydomain
epmautomate uploadfile data.csv
epmautomate importdata loadingq1data data.csv
epmautomate refreshcube
epmautomate runbusinessrule RevenueAllocation Quarter=Q1 Entity=USA
epmautomate runplantypemap CampaignToReporting ClearData=True
epmautomate logout

The utility displays a code in the console to indicate the status of the operation. See Working with EPM Automate.

Example 2-6 Java

public void integrationScenarioImportDataRunCalcCopyToAso() throws Exception {
    uploadFile("data.csv");
    executeJob("IMPORT_DATA", "loadingq1data", "{importFileName:data.csv}");
    executeJob("CUBE_REFRESH", null, null);
    executeJob("PLAN_TYPE_MAP", "CampaignToReporting", "{clearData:false}");
}

Common Functions: See Common Helper Functions for Java.

Dependent APIs: see Java Sample – UploadFile.java and Java Sample – ExecuteJob.java in Upload and Download Files.

Example 2-7 cURL

funcIntegrationScenarioImportDataRunCalcCopyToAso() {
	funcUploadFile "data.csv"
	funcExecuteJob "IMPORT_DATA" "loadingq1data" "{importFileName=data.csv}"
	funcExecuteJob "CUBE_REFRESH","cubeRefresh"
	funcExecuteJob "PLAN_TYPE_MAP" "CampaignToReporting" "{clearData=false}"
}

Example 2-8 Groovy

def integrationScenarioImportDataRunCalcCopyToAso() {
	uploadFile("data.csv");
	executeJob("IMPORT_DATA", "loadingq1data", "importFileName=data.csv");
	executeJob("CUBE_REFRESH", "cubeRefresh", null);
	executeJob("PLAN_TYPE_MAP", "CampaignToReporting", "clearData=false");
}