Scenario 3: Export and Download Metadata and Data

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

  • Export the metadata into entitydata.zip using job exportentitymetadata.

  • Export the application data into forecastdata.zip using job forecastdata.

  • List the contents of the Planning repository.

  • Download the exported data files (exportentitydata.zip and forecastdata.zip) to the local machine.

  • Log out.

Example 2-9 EPM Automate

epmautomate login username password https://<SERVICE_NAME>-<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com
identitydomain
epmautomate exportmetadata exportentitymetadata entitydata.zip
epmautomate exportdata forecastdata forecastdata.zip
epmautomate listfiles
epmautomate downloadfile entitydata.zip
epmautomate downloadfile forecastData.zip
epmautomate logout

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

Example 2-10 Java

public void integrationScenarioExportMetadataAndDataAndDownloadFiles() throws Exception {
	executeJob("EXPORT_METADATA", "exportentitymetadata", "{exportZipFileName:entitydata.zip}");
	executeJob("EXPORT_DATA", "Forecastdata", "{exportFileName:forecastdata.zip}");
	listFiles();       
	downloadFile("entitydata.zip");
	downloadFile("forecastdata.zip");  
}

Common Functions: See Common Helper Functions for Java.

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

Example 2-11 cURL

funcIntegrationScenarioExportMetadataAndDataAndDownloadFiles() {
	funcExecuteJob "EXPORT_METADATA" "exportentitymetadata" "{exportZipFileName=entitydata.zip}"
	funcExecuteJob "EXPORT_DATA" "Forecastdata" "{exportFileName=forecastdata.zip}"
	funcListFiles      
	funcDownloadFile "entitydata.zip"
	funcDownloadFile "forecastdata.zip"
}

Example 2-12 Groovy

def integrationScenarioExportMetadataAndDataAndDownloadFiles() {
	executeJob("EXPORT_METADATA", "exportentitymetadata", "exportZipFileName=entitydata.zip");
	executeJob("EXPORT_DATA", "Forecastdata", "exportFileName=forecastdata.zip");
	listFiles();       
	downloadFile("entitydata.zip");
	downloadFile("forecastdata.zip");  
}