Practical MongoDB Aggregations by Paul Done

Practical MongoDB Aggregations by Paul Done

Author:Paul Done
Language: eng
Format: epub
Publisher: Packt
Published: 2023-12-15T00:00:00+00:00


Expected pipeline result

Once executed, you'll see that the same number of documents appear in the new orders_typed collection as the source collection had, with the same field structure and fields names, but now using the strongly-typed boolean, date, integer, and decimal values where appropriate, as shown in the following result:

[ { _id: ObjectId('6064381b7aa89666258201fd'), customer_id: '[email protected]', further_info: { item_qty: 3, reported: false }, order_date: ISODate('2020-05-30T08:35:52.000Z'), value: NumberDecimal('231.43') }, { _id: ObjectId('6064381b7aa89666258201fe'), customer_id: '[email protected]', further_info: { item_qty: 2 }, order_date: ISODate('2020-01-01T08:25:37.000Z'), value: NumberDecimal('63.13') }, { _id: ObjectId('6064381b7aa89666258201ff'), customer_id: '[email protected]',\ further_info: { item_qty: 1, reported: true }, order_date: ISODate('2019-05-28T19:13:32.000Z'), value: NumberDecimal('2.01') } ]



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.