The TinyDB forum is finding a new at GitHub discussions. Although the content here will remain as an archive, the forum will be put into read-only mode in the next weeks.
i'm fetching some records from elasticsearch, and after a few calculation i'd like to store it in a file. the problem is i cant find a way to set the doc_id. its always a incremental integer. in my elasticsearch solution i have a custom value (defined by me) as the document _id, and i would like to use the same value
Hey yodog,
at the moment there is no way to specify a custom document ID when inserting a new document. But it's a feature I would consider. If you create a new issue in the TinyDB GitHub repo we can discuss possible solutions there.
Cheers!
thanks. i started https://github.com/msiemens/tinydb/issues/303
I wouldn't claim to know much, but I thought it was a standard database practice to have unique identifier for records that was not used for anything else and never, ever changed.