Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

restore by specific PK #33

Open
mzakirscayle opened this issue Apr 20, 2017 · 1 comment
Open

restore by specific PK #33

mzakirscayle opened this issue Apr 20, 2017 · 1 comment

Comments

@mzakirscayle
Copy link

I want to restore data across the multiple table with specific key, is it possible? if so let me know how can I achieved this?

for e.g I have following tables [Users, Transactions, Reports], relation is 1 user has many transactions and multiple transactions has single report so I want to restore data only user which has PK[userId] is 1

Thanks

@sdesalas
Copy link
Contributor

sdesalas commented Apr 22, 2017

You'll need to pre-process you data in order to do this as it goes beyond the scope of the package (ie, backup existing database, then restore it).

The steps would be:

  1. Backup your dynamodb database
  2. Extract all records with userId = 1 into a separate JSON file
  3. Restore file created in 2.

PS Bear in mind that the restore process does not wrap JSON objects in brackets [...].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants