Hello everyone, I am a beginner in mongoDB. I am developing an application using mongoDB with python and I am currently struggled with some problem. I have been manually creating a view using mongo compass before, but I realized that my system should automatically create a view when I create a collection using python. Is there anyway to solve this problem ( I have looked in stackoverflow 5 years ago and they said there is no libraries for that)?.
Views are created programmatically by operations like mongosh
In short, it’s a
$match and a
pymongo.database.create_collection() … views are there in the notes. It’s all done in the kwargs to the function.
I edited my previous reponse quite a bit, @Nattapol_Chiewnawintawat … hope you got the latest