Import Data Slices

Can be used to import data given a JSON data grid with a point of view, columns, and one or more data rows. Data will be imported only for cells that the user has read-write access to. Imports data of types Text, Date and Smart List along with numeric data. Returns JSON with details on the number of cells that were accepted, the number of cells that were rejected, and the first 100 cells that were rejected. You can set custom parameters to view rejected cells to understand the reason for the rejection.

REST Resource

POST /HyperionPlanning/rest/{api_version}/applications/{application}/plantypes/{plantype}/importdataslice

Request

Supported Media Types: application/json

Parameters:

The following table summarizes the client request.

Table 5-61 Parameters

Name Description Type Required Default
api_version Version of the API you are developing with Path Yes None
application The name of the application for which to import the data slice Path Yes None
plantype Name of the plan type for which to import the data slice Path Yes None

Example URL and Payload:

https://<SERVICE_NAME>-<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/HyperionPlanning/rest/v3/applications/Vision/plantypes/plan1/importdataslice

Payload Parameters

The Payload is JSON with the following parameters.

Table 5-62 Parameters

Name Description
dataGrid JSON data grid
aggregateEssbaseData

True or false.

If true, the values being saved will be added to the existing values. Only numeric values can be aggregated. Cells with Smart list, Text and Date data types will be rejected.

If false, the data values will be overwritten. A value of "#missing" will clear the cell value as shown in the example. The default is false.

Note: Values provided in the "data" section of the JSON payload will be used even for cells with supporting details provided. For cells with supporting details, make sure the total calculated for the incoming supporting details matches the value provided in the row "data" section.

See the following table for examples.

cellNotesOption

Possible values are: "Overwrite", "Append", and "Skip".

  • "Overwrite": The existing cell notes will be overwritten. An empty array for cell notes [] will indicate deletion of existing cell notes. A value of "null" will leave the existing cell notes intact.

  • "Append": New cell notes will be appended to existing cell notes.

  • "Skip": Cell notes will not be processed.

dateFormat Date format used in the input data grid. Valid formats are: "MM-DD-YYYY", "DD-MM-YYYY", "YYYY-MM-DD", "MM/DD/YYYY", "DD/MM/YYYY", "YYYY/MM/DD"
strictDateValidation Optionally, influence how Date cell values are validated. When set to true, date values are validated against the dateFormat specified in the payload and are rejected if the format for the value does not conform to the dateFormat. If set to false, date values are interpreted more leniently. Default is true.
customParams  
PostDataImportRuleNames

Optionally, provide the post data import rule names. This is primarily used by Data Management for planners. Default is false.

includeRejectedCells Optionally, indicate if the response should include the first 100 rejected cells. Default is true.
includeRejectedCellsWithDetails Optionally, indicate if the response should include the reasons why cells are rejected. Default is false.

Table 5-63 Import Data Slice Examples

Source Cell Target Cell Resulting Target Cell

Supporting Detail (SD)

#missing

SD

SD

Value

Add SD value to the existing value, do not add SD

Value

SD

Delete SD, add Value to the existing value

SD1

SD2

Delete SD2, add SD value to the existing value, do not add SD1

Sample payload:


   "aggregateEssbaseData":true,
   "cellNotesOption":"Overwrite",
   "dateFormat":"DD/MM/YYYY",
   "strictDateValidation”:true
   "customParams":{
       "PostDataImportRuleNames":"Post data rule 1, \"post, data rule 2\""      
       "IncludeRejectedCells":true, 
       "IncludeRejectedCellsWithDetails":true 
    }
   "dataGrid":{
      "pov":[
         "BaseData",
         "FY15",
         "Plan",
         "Working",
         "410",
         "P_160"
      ],
      "columns":[
         [
            "Jan",
            "Feb",
            "Mar"
         ]
      ],
      "rows":[
         {
            "headers":[
               "Project Number"
            ],
            "data":[
               "1",
               "2",
               "3"
            ],
            "cellNotes":[
               [
                  {
                     "contents":"Project delayed&gt;br/&gt;"
                  },
                  {
                     "contents":"Internal Project&lt;br/&gt;"
                  }
               ],
               [

               ],
               [

               ]
            ]
         },
         {
            "headers":[
               "Request Date"
            ],
            "data":[
               "1/02/2016",
               "30/03/2015",
               "30/04/2014"
            ]
         },
         {
            "headers":[
               "Project Type"
            ],
            "data":[
               "Other",
               "IT",
               "Construction"
            ]
         },
         {
            "headers":[
               "Project Investment"
            ],
            "data":[
               100000,
               110000,
               200000
            ],
            "cellNotes":[
               [

               ],
               [
                  {
                     "contents":"Internal + External investments made here.&lt;br/&gt;"
                  }
               ],
               [

               ]
            ],
            "supportingDetail":[
               null,
               {
                  "items":[
                     {
                        "value":60000,
                        "position":0,
                        "label":"Internal",
                        "generation":0,
                        "operator":"+"
                     },
                     {
                        "value":50000,
                        "position":1,
                        "label":"External",
                        "generation":0,
                        "operator":"+"
                     }
                  ]
               },
               null
            ]
	         
      ]
   }

Response

Supported Media Types: application/json

JSON Output

The rejected cells consist of cells that the user does not have read-write access to; cells where row or column member names are invalid and do not exist; cells where the data is invalid (for example, an invalid Smart List value); and cells that are non-numeric (Smart List, Text, or Date type) with data when aggregateEssbaseData is set to true.

{

"numAcceptedCells": 3,

"numRejectedCells": 9,

"rejectedCells": ["[BaseData, FY15, Plan, Working, 410, P_160, Jan, Project Number]", "[BaseData, FY15, Plan, Working, 410, P_160, Feb, Project Number]", "[BaseData, FY15, Plan, Working, 410, P_160, Mar, Project Number]", "[BaseData, FY15, Plan, Working, 410, P_160, Jan, Request Date]", "[BaseData, FY15, Plan, Working, 410, P_160, Feb, Request Date]", "[BaseData, FY15, Plan, Working, 410, P_160, Mar, Request Date]", "[BaseData, FY15, Plan, Working, 410, P_160, Jan, Project Type]", "[BaseData, FY15, Plan, Working, 410, P_160, Feb, Project Type]", "[BaseData, FY15, Plan, Working, 410, P_160, Mar, Project Type]"],