What is the data structure of the last piece of mongodb data obtained by python?

demand:
1. Get the last piece of data from mongodb that is the most table structure

difficulty:
1.document contains subdocuments

I don"t know how to implement it.

Mar.02,2021

be clear, your question


demand:
1. Get the table structure of the last piece of data in a collection of mongodb, and then generate the hive see table statement

difficulty:
1.document contains subdocuments


.sort ({time:-1})
.limit (1)
time replace the fields you need to sort. Document contains subdocuments. Please see the usage of $project

.
Menu