Load Data (External Source Models)
  • 1 Minute to read
  • Dark
    Light
  • PDF

Load Data (External Source Models)

  • Dark
    Light
  • PDF

Article summary

Load Data (External Source Models) ModelingImagesEDSMESM2Icon13.png

Use this API to import data into an external Data Source model.

ModelingImagesEDSMESM2Icon14.pngThis API works with both the legacy External Source Model functionality and the newest implementation of ESM.

Note:
Currently, this API cannot be used to import Planful Source Model data.

Incremental data loads are supported. Invoke the Clear Data API to clear all data in the model before the data import if incremental data load is not wanted. Use additional parameters to have a success and / or failure notification emailed to you.

POST /modeling/sourcemodel/data/load HTTP/1.1
Content-Type: application/xml
Accept: application/xml
X-ACCESS-TOKEN:
 
<?xml version="1.0" encoding="UTF-8"?>
<load-data-payload>
<model-name>$ModelName</model-name>
<delimiter>$Delimiter</delimiter>
<column-headers>
<entry>
<key>$ColumnNumber</key>
<value>$ColumnHeader</value>
</entry>
	...
</column-headers>
<notify-on-success>
<email>email1@domain</email>
<email>email2@domain</email>
</notify-on-success>
<notify-on-failure>
<email>email1@domain</email>
<email>email2@domain</email>
</notify-on-failure>
<data-records>
<data-record>$Data</data>
</data-records>
</load-data-payload>

Parameters

  1. $ModelName: Name of the model

  2. $Delimiter: Data delimiter

  3. $ColumnNumber: Column number that represents dimension/member on column

  4. $ColumnHeader: Data source column header

  5. $Data: data separated by delimiter

Sample Payload

<?xml version="1.0" encoding="UTF-8"?>
<load-data-payload>
<model-name>My Model</model-name>
<delimiter>@@</delimiter>
<column-headers>
<entry>
<key>1</key>
<value>LogLevel</value>
</entry>
<entry>
<key>2</key>
<value>Component</value>
</entry>
<entry>
<key>3</key>
<value>Hours</value>
</entry>
<entry>
<key>4</key>
<value>Minutes</value>
</entry>
<entry>
<key>5</key>
<value>Seconds</value>
</entry>
</column-headers>
<data-records>
<data-record>1@@CalcScripts@@02@@44@@31</data-record>
<data-record>2@@OLAP@@05@@29@@47</data-record>
</data-records>
</load-data-payload>

Additional Information about Data Load Notifications

You can optionally include two more sections for success and failure email notifications.

Notify on Success

<notify-on-success>
<email>email1@domain</email>
<email>email2@domain</email>
</notify-on-success>
Notify on Failure

<notify-on-failure>
<email>email1@domain</email>
<email>email2@domain</email>
</notify-on-failure>

Sample Payload with Notification

<load-data-payload>
<model-name>MyModel</model-name>
<delimiter>|_|</delimiter>
<aggregate-flag>true</aggregate-flag>
<page-dimensions>
<entry>
<key>Products</key>
<value>Dell</value>
</entry>
<entry>
<key>Accounts</key>
<value>IS</value>
</entry>
<entry>
<key>Scenario</key>
<value>Actual</value>
</entry>
</page-dimensions>
<column-dimensions>
<entry>
<key>1</key>
<value>Time</value>
</entry>
<entry>
<key>2</key>
<value>Measures</value>
</entry>
<entry>
<key>3</key>
<value>Measures</value>
</entry>
</column-dimensions>
<column-members>
<entry>
<key>2</key>
<value>MTD</value>
</entry>
<entry>
<key>3</key>
<value>YTD</value>
</entry>
</column-members>
<notify-on-success>
<email>mhamed@planful.com</email>
<email>ryennam@planful.com</email>
</notify-on-success>
<notify-on-failure>
<email>mhamed@planful.com</email>
<email>ryennam@planful.com</email>
</notify-on-failure>
<data-records>
<data-record>Mar|_|a</data-record>
<data-record>Jan1||a||b</data-record>
<data-record>Feb1||200||100</data-record>
<data-record>Mar||a||100</data-record>
<data-record>Mar|_|a</data-record>
</data-records>
</load-data-payload>

Was this article helpful?

ESC

Eddy AI, facilitating knowledge discovery through conversational intelligence