can't export aggregation result

Michael shared this problem 50 days ago
Cannot Reproduce

Hi

I have a query that produced a successful tabular result (4 columns of 9600 rows), but when I use menu option 'Export' > 'Export to JSON etc' and specify the path etc for my CSV file, nothing is actually exported. I see the final message as (file names swapped out):

export 0 docs from <file>.js to <exported>.csv finished.

I was in a rush to deliver a result, so I swapped to another GUI tool, and pasted in my query, and could successfully export from there.

The query is like the following

db.xxx.aggregate([

{

"$match": { ... }

},

{ $unwind: ... },

{ $unwind: ... },

{

"$match": { ... }

},

{

"$match": { ... }

},

{

"$group": { ... }

},

{

$sort: { ... }

},

{

"$project": { ... }

}

]

)


Thanks.

Comments (3)

photo
1

Thanks for opening your first issue here! If you're reporting a /1f41e bug, please make sure you include steps to reproduce it.

  • NoSQLBooster Version
  • Operating System (Windows/Mac/Ubuntu):
  • Expected Behavior
  • Actual Behavior
  • How to Reproduce (include sample JSON data)
  • Screenshots

photo
1
  • NoSQLBooster Version 5.2.9
  • Operating System (Windows/Mac/Ubuntu): Windows 10
  • Expected Behavior: CSV file is written out
  • Actual Behavior: no file is created, and the above "export 0 docs" message
  • How to Reproduce (include sample JSON data): this is tricky.. honestly I think exports should just work (like it did when I copied the query as-is to a competitor product and their exported with no issue). I've had odd issues in the past with exporting, but never a complete failure like this. I feel like exporting is the weakest part of the product.
  • Screenshots: not sure if a screen shot helps - I start with a valid result-set as a table, and exporting yields the above message after the JS file is run

photo
1

I tried to do some tests locally, but can't recall this issue. It's inefficient to solve the problem by guessing, so I can only set the status to "Can not reproduce".