Import Data

Imports data from a file in the Planning repository into the application using the import data settings specified in a Planning job of type Import Data.

You can also override some of the parameters of the job definition while executing this job from a REST API.

For Planning, Financial Consolidation and Close, and Tax Reporting, you can review the rejected data records that have errors. To do this, specify an error file that captures the data records that are not imported for each dimension. If an error file is specified, the ZIP file is stored in the Outbox where you can download the file using Inbox/Outbox Explorer or tools like EPM Automate or REST APIs, for example, with the Download API.

Using this REST API requires prerequisites, such as understanding how to use jobs. See Prerequisites. Be sure that you understand how to use jobs as described in Managing Jobs.

Request

Supported Media Types: application/json

Parameters

The following table summarizes the client request parameters specific to this job. For additional parameters that are common to all jobs, see Execute a Job.

Table 5-13 Import Data

Name Description Required Default
jobType Import Data or IMPORT_DATA (both parameters are supported) Yes None
jobName

The name of a job of type import data exactly as it is already defined in the Planning application.

Example: dailydataload

Yes None
importFileName

Optionally, you can specify the name of the ZIP, CSV or TXT (Essbase format data file) file from which data is to be imported.

If you specify a file name, the import file name in the job is ignored. If the job is defined to import data in Essbase format, the ZIP file must contain an Essbase format TXT file.

For other import jobs, the ZIP file may contain one or more CSV files that identify the import sequence in the file names; for example data1-3.csv, data2-3.csv, and data3-3.csv.

The value must use JSON syntax.

No The source file of the job definition.
sourceType

You can override the source type to be used.

Allowed value is Planning or Essbase.

No The Source Type parameter of the job definition.
delimiter You can override the delimiter to be used. Allowed value is comma or tab.

This is only applicable when the source type is Planning.

No The delimiter used in the job definition.
dateFormat

You can override the date format to be used. This is applicable only when the source type is Planning.

Allowed value is one of the following: MM-DD-YYYY, DD-MM-YYYY, or YYYY-MM-DD.

No The Date Format parameter of the job definition.
includeMetaData

You can override the option to include metadata. Allowed value is true or false.

This is only applicable when the source type is Planning.

No Include Metadata parameter of the job definition.
cube

You can override the name of the cube defined in the job definition.

This is only applicable when the source type is Essbase.

No Cube parameter of the job definition.
errorFile

Optionally, create an error file. The error file is zipped with the name of this parameter. The ZIP file is stored in the Outbox where it can be downloaded, for example, with the Download API.

This API overrides any existing error file with the same name. Example: ImportDataErrorFile.zip

No No error files are created

For a sample URL, see Sample URL and Payload in Execute a Job.

Sample Payloads

Example 1: Executes the import data job ImportJob and overrides the importFileName parameter.

{"jobType":"IMPORT_DATA","jobName":"ImportJob",
"parameters":{
     "importFileName":" myImportfile123.zip"
     }
}

Example 2: Executes the import data job ImportJob and overrides the delimiter, dateFormat, and includeMetaData parameters.

{"jobType":"IMPORT_DATA","jobName":"ImportJob",
"parameters":{
     "delimiter":"comma",
     "dateFormat":"MM-DD-YYYY",
     "includeMetaData":"false"
     }
}

Example 3: Executes the import data job ImportJob defined with sourceType as "Essbase" and overrides the sourceType and cube parameters.

{"jobType":"IMPORT_DATA","jobName":"ImportJob",
"parameters":{
     "sourceType":"Essbase",
     "cube":"Plan1"
     }
}

Example 4: Executes the ImportData job ImportDataJob and overrides the errorFile parameter with a value ImportDataErrorFile.zip. If error records are found during the Import Data operation, a ZIP file called ImportDataErrorFile.zip is created in the Planning repository. The generated error file can be downloaded from the Outbox from the job status page or using the Download REST API or EPM Automate downloadfile command.

Copy{ 
    "jobType": "IMPORT_DATA",
    "jobName": "ImportDataJob",
    "parameters": {
      "errorFile":"ImportDataErrorFile.zip"
    }
}