Skip to main content

Conscia Object Mapper

Conscia's Object Mapper Component allows you to restructure and/or merge the data from your backend sources into a data model that your applications can more easily consume, according to your unique business requirements. It involves identifying the data elements in the source systems and specifying how they should be transformed and mapped to the corresponding data elements in the target system(s).

An Object Mapper can have multiple sources, which could be Component responses, Context Field values, or JS Expressions. For each source, use the drag and drop UI to select, map and transform the required properties.

Whether you're overwriting existing properties with new data, or adding entirely new properties, the Object Mapper streamlines the process, ensuring your final target schema is a customized representation of your target data model.

DX Studio UI Configuration

This example shows pulling data from a nested array results[0].hits and mapping it to a new property related.

Object Mapper

This example of the drag and drop mapping UI shows a multi-level schema mapping with JS expression transformations of the data.

Object Mapper Mapping

For more detailed information on the Object Mapper as well as other Schema Mapping Components and strategy, see the the following page:

Mapping Backend Schema to Frontend Data Model

The Object Mapper Component can be configured via the Developer UI within DX Studio or via APIs like any other component.

DX Engine Evaluation

Here is how the Object Mapper is evaluated by the DX Engine:

  1. Initialization: The process commences with the construction of the initial JSON schema object. This beginning framework ultimately shapes up into the target schema.

  2. Sequential Evaluation: Each subsequent schema object in the sequence is evaluated, with the sequence order bearing significance as each new schema may adjust preceding entries.

  3. Configuring Mapping Logic: Here's where the power of customization comes into play. For each object in the target schema, you can individually define its mapping logic. Whether it's JSONPath, JMESPath, JavaScript, or JSONata, the choice is yours. This allows you to map each object to different upstream data sources based on your requirements.

  4. Overwriting Existing Properties: If the newly evaluated schema object contains properties that already exist in the evolving target schema, those existing properties are replaced with new values. This ensures that the most recent information takes priority.

  5. Adding New Properties: When the evaluated schema object introduces properties not yet included in the target schema, these new properties are seamlessly added.

  6. Progressive Refinement: The process of evaluating, customizing mapping logic, overwriting, and adding is iteratively applied to each schema object. This gradually refines the target schema, giving it shape and depth according to your specifications.

  7. Completion: After all schema objects in the sequence have been evaluated, merged, and customized, the result is the definitive target schema. This is a tailored integration of all individual schema objects, shaped according to your data model needs.

This process underscores the flexibility and control you have over your data structure using the target schema. By determining the mapping logic for each object, you ensure that your final schema fits your specific needs, regardless of the complexity or diversity of your upstream data sources.

API Component Configuration

Parameter NameParameter PropertyDescription
Default SourcedefaultSourceData value to be used in the mapper expressions if not overridden within the mapper definition.
Default Expression TypedefaultExpressionTypeOne of: jmespath, jsonpath, jsonata, javascript
Object MapsobjectMapsArray objects that descrbe how to map sources to an JSON object. objectMaps: [{ source, expressionType, object }]
Object Maps / Source DatasourceThe data value to be used for the expressions in this set of property mappings.
Object Maps / Expression TypeexpressionTypeOne of: jmespath, jsonpath, jsonata, javascript
Object Maps / ObjectmappingsJSON Object to be mapped. Each property value is an expression