Answer the question
In order to leave comments, you need to log in
How to check if the data is already in the database?
Goodnight.
For the first time I encountered mongoDB, due to inexperience, there were some difficulties.
I am writing a small Python script that takes xml files from one website. These xml files are updated daily (their number is increasing).
What I need?
You need to get an xml file, make xml to json (I kind of figured it out) and put the data in json form into the database. But here is the problem, I want to do this every day (week/month) while the data for the previous days remains the same, only new ones are added.
How to do it more intelligently? Do you need to update them somehow?
Thanks for any help.
Z.Y. this is not a task, I just ask you to point out possibly some useful links that describe similar methods or something like that.
Answer the question
In order to leave comments, you need to log in
What is the problem? Before adding, do Select (or whatever this database has?) And look for entries. If not, add new data.
To speed up the process, you can store a hash of data in the database and look for it. You can even do wholesale Select a dozen or two hashes.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question