Scenario 1: Import Metadata into Applications

In this scenario, you run a sequence of commands or use REST APIs to complete these steps. For information on EPM Automate commands, see Working with EPM Automate for Oracle Enterprise Performance Management Cloud.

  • Sign in 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 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://https://<SERVICE_NAME>-<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com

    • Identity Domain: IDENTITYDOMAIN

  • Upload metadata file: accounts.zip

  • Import metadata from accounts.zip into the application using job accountMetadata

    Note:

    Because metadata is imported from a file specified by the importmetadata command, the EPM Automate Utility ignores the import filename, if any, defined in the job.

  • Refresh the cube

  • Log out

Example 2-1 EPM Automate

epmautomate login usernamepassword https://<SERVICE_NAME>-<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com identitydomain

epmautomate uploadfile accounts.zip
epmautomate importmetadata accountMetadata accounts.zip
epmautomate refreshcube
epmautomate logout

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

Example 2-2 Java

public void integrationScenarioImportMetadataIntoApplication() throws Exception {
	uploadFile("accounts.zip");
	executeJob("IMPORT_METADATA", "accountMetadata", "{importZipFileName:accounts.zip}");
	executeJob("CUBE_REFRESH", null, null);
}

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-3 cURL

funcIntegrationScenarioImportMetadataIntoApplication() {
	funcUploadFile "DemoApplication_HSS_Vision.zip"
	funcExecuteJob "IMPORT_METADATA" "accountMetadata" "{importZipFileName=accounts.zip}"
	funcExecuteJob "CUBE_REFRESH" "cubeRefresh"
}

Example 2-4 Groovy

def integrationScenarioImportMetadataIntoApplication() {
	uploadFile("DemoApplication_HSS_Vision.zip")
	executeJob("IMPORT_METADATA", "accountMetadata", "importZipFileName=accounts.zip");
	executeJob("CUBE_REFRESH", "cubeRefresh", null);
}