CompanionCompanion
Companion for Delivery
Companion for Business
Companion for Integration
Contact us
Companion for Delivery
Companion for Business
Companion for Integration
Contact us
  • Companion for Integration

    • Introduction
    • Getting Started
    • Configuration
    • Excel templating
    • How it works
  • YAML Configuration

    • Principles
    • Syntax
    • Validation
  • Custom Functions

    • Summary
    • arrayToJSON
    • bool
    • concatValueAndUnit
    • convertUnit
    • currentContextId
    • exportTime
    • eval
    • firstNonEmpty
    • getContextName
    • getEvents
    • getLastEventTime
    • getReferencesByAttributeGroup
    • getStoredValue
    • getWorkspaceId
    • hash
    • hasStoreKey
    • if
    • integer
    • join
    • mergeInheritedValues
    • multiValuesToJSON
    • number
    • nodeList
    • order
    • resolveUnitLabel
    • serializeAssetPushLocationsToJSON
    • serializeAttributeLinksToJSON
    • serializeContextReferenceToJSON
    • serializeContextReferencesToJSON
    • serializeContextValuesToJSON
    • serializeDataContainerToJSON
    • serializeDataContainersToJSON
    • serializeListOfValueValuesToJSON
    • serializeReferencesToJSON
    • serializeReferenceToJSON
    • serializeValuesToJSON
    • store
    • toXML
    • uppercase
  • Execution

    • Summary
    • Composite
    • From STEP
    • Standalone
    • Performance statistics
  • Configuration

    • ActiveMQ extension
    • Amazon AWS extension (SNS, SQS, Kinesis, S3)
    • ElasticSearch/OpenSearch extension
    • File extension (Excel, CSV, JSON, XML, JSONL, XMLL)
    • Kafka extension
    • Kafka Core extension
    • MongoDB/Cosmos DB extension
    • SQL extension
    • REST extension
    • Google Pub/Sub extension
  • c4i SaaS

    • Introduction
    • Managing jobs
    • Managing executions
    • Managing users
    • Changelog
  • Changelog

    • Core features changelog
    • ActiveMQ extension changelog
    • Amazon AWS extension changelog
    • Composite extension changelog
    • ElasticSearch extension changelog
    • File extension changelog
    • Kafka extension changelog
    • Kafka Core extension changelog
    • MongoDB/Cosmos DB extension changelog
    • SQL extension changelog
    • REST extension changelog
    • Google Pub/Sub extension changelog

File extension

Summary

This extension generates files in one of the following formats: Excel, CSV, JSON, XML, JSONL, XMLL

Plugin ID

The plugin ID for File delivery is fr.cantor.c4i.FileDelivery.

Properties

Environment independent parameters (set in extension configuration or properties file)

Property keyDescriptionMandatoryDefault value
configAssetIdThe ID of the asset containing the YAML mappingsYes
connectionThe name of the connection in the c4i.properties fileYes
prefixFileNamesWithContextIdtrue or false to indicate whether or not to prefix the file names with the context IDsYes
outputFormatCSV, EXCEL, JSON, JSONL, XML or XMLLYes
fileNameStrategyIndicates how to name the output file. Authorized values are FILENAME_TIMESTAMP, STEPXML_TIMESTAMP, COPY_FILENAMENoSTEPXML_TIMESTAMP
includeEmptyTabstrue or false to indicate whether or not to include empty tabs when using Excel templatesNofalse
csvSeparatorThe CSV separator used to separate values, can be ,, \t,|,;, or (Space)Only if outputFormat = CSV
templateExtensionsA semicolon (;) separated list of extensions to resolve template filesNo.xlsx
cacheConfigThe ID of the asset containing the JCS configurationNo
displayPerfStattrue to display performance statistics (see Performance statistics dedicated page)Nofalse

Environment dependent parameters (set in centralized c4i.properties file)

Property keyDescriptionMandatoryDefault value
outputDirectoryThe path of the directory where the output files will be writtenYes
templateFolderPathThe path of the directory where the Excel template are in standalone mode onlyNo

Configuration example

JSON specificities

When producing JSON files, there are two formats for target node mapping :

  • Simple (Array) : ${fileName}[{key}]
  • Complex (Object): ${fileName}#{target node path}[{key}]

Simple (Array) Mapping

Using this format will produce a JSON file containing an array whose elements will be the mapped nodes.

For example, given the following configuration:

- Product:
  product[id]:
    - ./@ID: id

The resulting file will contain a single JSON array. For each <Product> in the source file, a new object will be inserted.

[
  { "id": "Product1" },
  { "id": "Product2" }
]

Complex (Object) Mapping

Using this format will produce a JSON file containing a JSON Object whose values (or sub-values) will be JSON arrays containing the mapped nodes.

For example, given the following configuration:

- Product:
  product#data.products[id]:
    - ./@ID: id

The resulting file will contain a single JSON Object. For each <Product> in the source file, a new object will be inserted in the "data.products" array.

{
  "data": {
    "products": [
      { "id": "Product1" },
      { "id": "Product2" }
    ]
  }
}

Arrays indices are not supported in the supplied path.

XML specificities

Target node mapping

When producing XML files, the format for target node mapping is the following : {fileName}#{target node xPath}[{key}]

For example, given the following configuration :

- Product:
  product#MyCustomProducts/Product[./@ID]:
    - ...

For each <Product> in the source file, a new <Product> element will be created underneath the root node <MyCustomProducts> in the output XML file [{contextId}]_product.xml.

The root node (in this case MyCustomProducts) must be the same across all the mapping rules for a given output file. Otherwise, a DOMException will be thrown when generating the file.

Converting JSON values to XML

JSON values such as returned by c4i custom functions are converted to XML, as shown by the following example :

Last Updated: 4/13/26, 10:42 AM
Prev
ElasticSearch/OpenSearch extension
Next
Kafka extension