Git Product home page Git Product logo

Comments (6)

UmanShahzad avatar UmanShahzad commented on August 25, 2024 1

Yeah of course. IPinfo (https://ipinfo.io) also ships MMDB files and we try to stay away from arrays/maps because of some of these limitations.

I think the best we'll be able to do then is similar to what you've done but by simply handling the error and printing something, saying that CSV/TSV support is not available for arrays/maps, when they're detected.

from mmdbctl.

jhg03a avatar jhg03a commented on August 25, 2024 1

Switching from map[string]string to map[string]interface{} also opened up a new host of issues as well where things like integer values were getting dropped or being able to import nested objects too.

from mmdbctl.

jhg03a avatar jhg03a commented on August 25, 2024 1

Data enrichment can look something like export of an mmdb to json. Then use standard json manipulation tools like jq or jmespath, and reimport into a new mmdb.

from mmdbctl.

UmanShahzad avatar UmanShahzad commented on August 25, 2024

Yeah this is definitely an assumption we've made deliberately, because our own use cases only entailed strings and we realized that letting it become arbitrary is both not useful to us and causes fundamental issues with some input/ouput formats as you already mentioned.

I think the most we could go for is trying to support data types that can be trivially converted back & forth to string, like numbers and booleans. But arrays and maps will always be super opinionated.

from mmdbctl.

jhg03a avatar jhg03a commented on August 25, 2024

Be aware that the commercial maxmind datasets leverage both arrays and maps which might affect the usability of the project in a broader audience such as if you're performing augments/updates.

I've been able to mostly work around and get it working for me by deleting code around the use of CSV/TSV because the underlying mmdb libraries still support the nested objects and json can express them fine when going to marshal/unmarshal them.

from mmdbctl.

UmanShahzad avatar UmanShahzad commented on August 25, 2024

@jhg03a This is fixed - can you provide feedback?

from mmdbctl.

Related Issues (15)

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.