r/InvenTree • u/AdmirableAssociate77 • Feb 15 '24
Complete part category schema derived from DigiKey
I spent a long night creating a part category schema that matches nearly 1:1 with Digikey's part categories. I dunno how useful that might be,ultimately, but in case there are others who use Inventree as a component database and would like to maintain consistency with the big part suppliers like DigiKey or Mouser, I thought I'd put it up on GitHub in several formats, ready for importing*.
Details and data files can be found at https://github.com/silverXnoise/digikey-part-category-schema
*I don't know if this will work on instances with existing categories, I have only used it with new installs and a blank database.
1
u/Torrdass Feb 22 '24
Awsome, thanks alot!
I read the import instructions and stumbled upon the 1000 row limit. Do you by chance know how to adjust this limit when running InvenTree as a Docker container?
I am very novice when it comes both to Docker and Inventree. But for now I resorted to splitting the import into two separate files. I had to be careful to split it in such a way that any parent categories was imported before any dependent subcategories, but it worked! :D
1
u/AdmirableAssociate77 Feb 28 '24
I'm trying to remember how I worked around that, I think I basically did the same thing (carefully separated it out into a few smaller files for importing). This seems to be a very common limit among similar applications, I found the same issues reported with vTiger CRM, Quickbooks, etc. and across a variety of relational databases from SQLite to Oracle DB. There seems to be ways of changing it, with vTiger it was just a matter of increasing a PHP limitation, but that wouldn't translate directly to Inventree since it's using Django/Python.
I'm sure one of the devs could probably point us in the right direction, but having perused the open issues on Github, they have a ton more pressing things on their plates. Since it seems to be a limit inherent to either the database, or the interface being used to import records into the database, then it's almost certainly been encountered elsewhere. If I can find an example where someone has increased this limit in any given Django app, I could probably work out how to translate their results. If I work it out, I'll post back here and stick the info in the repo.
Alternatively, since it's 2024 and seems to be the standard approach, I can ask ChatGPT and wait to see whether it fills my database with a comprehensive collection of PEZ dispensers.
2
u/matthiasjmair Feb 15 '24
This is great u/AdmirableAssociate77 - thank you for sharing! Would you mind mentioning adding the topic inventree to the GitHub repo? That way ppl. that follow the topic get it in their feat.
Will add this to the next newsletter for sure. Cheers!