MongoDB Connector > Mappings and Mapping Tasks with MongoDB > Writing hierarchical data in mappings
  

Writing hierarchical data in mappings

When you read data from relational sources and write data to a MongoDB target, you must use a Hierarchy Builder transformation.
The Hierarchy Builder transformation processes relational input from the upstream transformation and provides JSON output to the downstream transformation. The Hierarchy Builder transformation produces JSON output based on the sample schema of the MongoDB table that you associate with the transformation and the way that you map the data.