The easiest way would be to write a post-processing script in the datamapper (you create it in the closing step of the DataMapper). At that stage, you have access to the entire record set that was just extracted.
A very basic example would look something like this (this example exports all fields from each master record, but not the detail tables):
var file = openTextWriter('C:\Test\MyExport.csv');
var j = 0;
for(var i=0;i<data.records.length;i++) {
for(j=0;j<data.records[i].fields.length;j++) {
file.write('"'+ data.records[i].fields[j].toString() + '",');
}
file.write('\n');
}
file.close();
Mind you, there is absolutely no error-trapping in this example and it may not be exactly what you need, but it should get you started in the right direction.