Giter VIP home page Giter VIP logo

Comments (3)

bchew avatar bchew commented on July 18, 2024

Hi Ryan, the code currently assumes the 'environment prefix' is separated from the table name by a -. However, in your case, it is split by . thus the reason why it was not working correctly.

I've clarified this behavior in the readme to make it clear in the latest update to master (ffe4d5f, 0.1.13) and have added a --prefixSeparator optional argument so your command should work correctly now:

python dynamodump.py --mode backup --region us-east-1 --srcTable test* --prefixSeparator .

As for your query on test.atlas, unfortunately this would not be supported currently as the text before the separator is being treated as the environment and this change would impact the overall behaviour (as it seems you're using another namespace level). If you have ideas on how to do this, feel free to open a PR.

from dynamodump.

RyanGWU82 avatar RyanGWU82 commented on July 18, 2024

Thanks for looking into this. Why do you have the namespace rules at all? Why not just use traditional globbing like Unix shells use, and treat all non-wildcards equally?

In my case, I have 7 tables named test.atlas.<something> and 1 table named test.scorekeeper.<something>. I need to export all of the atlas tables but need to skip the scorekeeper one. It has millions of records and an export would take days to finish. I wrote a wrapper script that runs dynamodump on each table separately, but I'd prefer to use the wildcard syntax if I can.

from dynamodump.

bchew avatar bchew commented on July 18, 2024

It's not a namespace rule per se, just how the script assumes the first part of the table name to be the 'environment' as it was written with the idea of backing up/restoring data between different environments, for simplicity sake.

You're right that it probably can be switched to use wildcards as it is done in traditional globbing, but as I've mentioned before, this involves a change in behaviour and I would not be looking to change it for now. :)

from dynamodump.

Related Issues (19)

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.