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

Load Data (External Source Models)

  • Dark
    Light
  • PDF

Article Summary

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

Notes:

Below are some considerations when loading data into the ESM:

  • Date Field Formats: The date field must be in one of the following formats: MMM-YYYY, MMM-YY, DD/MM/YYYY, MM/DD/YYYY, DD-MM-YYYY, or MM-DD-YYYY. It is important to select the correct format while creating the model to avoid any InvalidDateInput error.

  • Null Data Handling: If null data is provided, the ESM will use the following default values:
    • For text fields, an empty string will be used.
    • For date fields, 31st December 1969 will be used.
    • For numeric fields, 0 will be used.
  • Number Format: The ESM supports commas as the thousands separator and dots as the decimal separator for numeric fields. If your data uses a different format, you may need to convert it before loading it into the ESM.

By keeping these considerations in mind, you can ensure that your data is loaded correctly into the ESM and that you can use it effectively for your analysis and modeling needs.

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>

Was this article helpful?

What's Next