Giter Site home page Giter Site logo

Comments (3)

knadh avatar knadh commented on May 22, 2024

Hi @nishant-nayak. There isn't an API to upload bulk data, but there are APIs to insert and manage individual entries and definitions. What is your usecase? To integrate with a system to continuously add data (the entry/definition APIs are sufficient for that) or to continuously add large datasets (which is typically unlikely).

An API for CSV bulk load isn't ideal because:

  • Bulk loading is an expensive process and could take arbitrarily long time to complete. So an API request can't wait for the process to finish (broken request may cause partial import), instead, it'll have to queue the file for import.
  • This'll either need the app to have filesystem access or an in-memory blob to store the bulk data.
  • Implementing this is complex.
  • Now to check the status of a queued file, there'll have to be a status check API that would have to be polled.

Dictionaries typically do not get frequent bulk loads of data. It's almost always one off, or rare, and for that, CLI is sufficient.

from dictpress.

nishant-nayak avatar nishant-nayak commented on May 22, 2024

Hi @knadh , the use case that we were looking at is to add large datasets to our dictionary. As you mentioned, it won't be a frequent operation so it should be doable with just the CLI. We have a similar upload feature on another application where we do implement the in-memory blob and status of a queued file using Django, but I believe with the glossary it may not be necessary.

Thanks for the clarification!

from dictpress.

knadh avatar knadh commented on May 22, 2024

I've implemented an asynchronous CSV->DB import system in another Go project where frequent bulk uploads are a necessity, but had decided not to bring that complexity into dictpress because of the reasons mentioned above; dictionaries seldom need continuous bulk imports.

Please do let me know if you need any help using dictpress in the glossary project. Excited to see it!

from dictpress.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.