0

I have below 2 table in dyanmodb

users1

ID name rollno
First-4 First 4
Second-2 Second 2

users2

ID name rollno
First-4 First 4
Fourth-2 Fourth 2

so if we compare users1 and users2 we should get the values which are present in both table so it will return

ID name rollno
First-4 First 4

In dyamodb How can I achieve it using node js sdk lambda.

2
  • You will get the result one time or every day? Get all items in 2 tables and compare them. Commented Feb 19, 2021 at 8:17
  • one time I need to get it in an efficient way Commented Feb 19, 2021 at 9:45

1 Answer 1

1

DynamoDB does not support joins, so you're going to need to do a lot of the heavy lifting yourself if you want to compute the difference between two DynamoDB tables. You're going to have to manually compare the items of each table, probably by using the scan operation on each table.

Alternatively, you might consider exporting the entire database to S3 and doing the comparison outside of DDB.

If this is a one-time thing, performance may not be much of a concern. If this is a common access pattern in your database, you'll want to take an entirely different approach.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.