title: AWS Database Migration Service (DMS) MongoDB to CSV in S3
body: <p>I need to use AWS Database Migration Service (DMS) to move data from MongoDB to CSV in S3. I can export to CSV in S3 using the table mode and include a header row, however nested arrays within the MongoDB document are being exported as a string breaking the CSV structure:</p>
  <p>Mongo:</p>
  <pre><code>{ &quot;_id&quot; : 1234,
    &quot;dealershipName&quot;: &quot;Bills&quot;,
     &quot;cars&quot;: [
         {&quot;year&quot;: 2013,
          &quot;model&quot;: &quot;MongoCar&quot;,
          &quot;mechanicNotes&quot;: &quot;Runs great!&quot;},
         {&quot;year&quot;: 1985,
          &quot;model&quot;: &quot;DMC-12&quot;,
          &quot;mechanicNotes&quot;: &quot;Great Scott!&quot;}
   ]
  }
  </code></pre>
  <p>CSV in S3:</p>
  <pre><code>124,&quot;Bills&quot;,&quot;[{&quot;year&quot;:2013&quot;, .........}]&quot;,
  </code></pre>
  <p>Can anyone advise how to export the nested arrays inside MongoDB documents to CSV using DMS while maintaining the CSV format (i.e not having a string of the array as a field in the CSV, but broken out into fields - maybe in a separate CSV somehow)?</p>