-
Type: Task
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: mongoexport
1) --fieldFile option is ignored if using the default JSON output format or if using the --jsonArray option.
Shouldn't it work like the --fields option which works with either JSON or CSV format?
noticed in the export.cpp, there's this line which doesn't take the fieldFile parameter into consideration
if ( hasParam( "fields" ) || csv ) {
2) with the csv, we return only the fields listed in --fields or --fieldFile since we get specific fields from the object
but, with JSON, we return the ``_id`` field along with the fields listed in --fields option (and if you specify a field in a subdocument a.b, will return the whole subdocument field a instead of just the a.b) since we do a straight
out << obj.jsonString();