Import Data
Use this REST API to import data from a file in the repository into the application using
the import data settings specified in a job of type Import Data
.
You can override some of the parameters of the job definition while executing this job from a REST API.
You can also import data using the parameter values provided, without an explicit
predefined Import Data
job definition.
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 errop 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.
Required Roles
Service Administrator
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 8-13 Import Data
Name | Description | Required | Default |
---|---|---|---|
jobType |
Import Data or IMPORT_DATA
(both parameters are supported)
|
Yes | None |
jobName |
Name of this job. Example: dailydataload |
No | Import Data |
importFileName |
You can specify the name of the ZIP, CSV or TXT (Oracle Essbase format data file) file from which data is to be imported. If the parameter passed to import data is 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 The value must use JSON syntax. |
Yes | None |
sourceType |
Paramter to specify the source of data. Allowed value is |
Yes | None |
delimiter |
Parameter to specify a delimiter.
Allowed value is
This
is only applicable when the source type is
|
No | comma |
dateFormat |
Parameter to specify the data format. Allowed value is one of the following:
|
No | MM-DD-YYYY |
includeMetaData |
Parameter to specify to include metadata from the data file. Allowed value is This is only applicable when the source type is
|
No | false |
cube |
Parameter to specify the cube name. This is only applicable (and becomes mandatory) when the source
type is |
Yes | None |
errorFile |
Paramter to specify the The error file is zipped with the name of this parameter. The ZIP file is stored in the Outbox. You can download it with the Download API. This API overrides any existing error file with the same name. Example: ImportDataErrorFile.zip |
No | No error files are created |
stopOnError
|
Parameter to stop the import process if an intermediate error is
encountered during the import, for example, if data load finds
an unknown member or invalid data value. This setting can only
be used when When using this option, if you specified an error file, you can then review the rejected data record that has the error. The record is included in a ZIP file that is stored in the outbox where you can download it for review, for example, with the Download API. Allowed value is |
No | true |
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.
{"jobType": "IMPORT_DATA",
"jobName": "ImportDataJob",
"parameters": {
"errorFile":"ImportDataErrorFile.zip"
}
}
Example 5: Executes the ImportData job ImportDataJob_Sample defined with
sourceType
as Essbase
, and overrides the
stopOnError
parameter with the value as true
.
The data load will stop loading in case of an intermediate error.
{
"jobType": "IMPORT_DATA",
"jobName": "ImportDataJob_Sample",
"parameters": {
"importFileName":"importDataFile_Essabse.txt",
"cube":"Plan1",
"stopOnError":"true"
}
}
Example 6: Executes the import data job with all the mandatory parameters.
{
"jobType": "IMPORT_DATA",
"parameters":{
"sourceType": "Planning",
"importFileName": "myImportfile123.zip",
"delimiter": "comma"
}
}
Example 7: Executes the import data job with all the mandatory parameters. The
sourceType
parameter is specified as Essbase
,
and cube
provides the cube name. Default values are assumed for
other non-mandatory parameters.
{
"jobType": "Import Data",
"parameters":{
"sourceType": "Essbase",
"cube": "Plan1",
"importFileName": "EssbasePlan1_data.zip"
}
}