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.

Supported Media Types: application/json

Parameters

The following table summarizes the client request specific to this job. For parameters that are generic 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 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 Data 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.

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