About data management scripts

Data management scripts handle actions on data.

File types

When importing a document, three types of files can be provided to AccountingIntegrator.

Data file

The data file contains the data to import.

When the file format is:

  • Fixed flat file or variable flat file, each line of the file stores an Object or an Element and can contain one or several errors.
  • Fixed flat file, it can only contain one error per line.

Property file

The property file is an XML file that stores the property values that are associated with the Collection created during the import.

Error file

The error file is an XML data file that stores errors on data.

For each error, the file contains:

  • A path that identifies the object in error.
    It is expressed using an XPath syntax: /<type>[<id prop>=’<value>’].
    • <type> corresponds to the Object Type of the Element Type.
    • <id prop> corresponds to the properties of the Object Type or Element Type that are marked as key properties. The order must be the same as the order the property are defined.
    • <value> corresponds to a property value.
  • An error code
  • An error description
  • A list of property names that are in error. The delimiter that is used between properties is comma (‘,’).

Examples of file formats

Property file

<?xml version="1.0" encoding="UTF-8" ?>

<properties>

<property>

<name>FILE_ID</name>

<value>A23234ZZ3451234</value>

</property>

<property>

<name>APPLICATION_SOURCE</name>

<value>DFA</value>

</property>

</properties>

Error file

<errors>

<error>

<path>document/ACCDOC[JOURNAL_NAME=’1’]/LINE[LINE_NUMBER=’1’]

</path>

<errorCode>REP</errorCode>

<description>MARKET not found</description>

<field>MARKET</field>

</error>

</errors>

Related Links