From the course: AWS for Developers: DynamoDB
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Insert data with transactions in DynamoDB using Node.js - Amazon Web Services (AWS) Tutorial
From the course: AWS for Developers: DynamoDB
Insert data with transactions in DynamoDB using Node.js
- [Instructor] Let's talk about transactions for a second. In my team.json file, I've got some team information here, but what happens if one record is corrupted. First, I cleared out my table. So I'm going to go ahead and scan it, just to show you that it's empty, and let's go ahead and return here to our teams.json folder, and let's mess up this last record for the New York Mets. Instead of Team ID, I'm putting team info, and instead of sort key, I'm just calling this, abbreviation. Now I have no partition key, and I have no sort key, so my code is going to confuse them how to insert this. I'm going to go ahead, and run my insert script again, and you see I got an error. Let's scan the table, and see if there's any data in it. There is. I got a partial result set, with some of the data in my file, but not all of it. Now because the data is small, we can see we're just missing the New York Mets, but imagine if this was thousands of entries and items here, and I don't know which one…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Installing DynamoDB local3m 53s
-
(Locked)
Overview of client libraries2m 6s
-
(Locked)
Creating tables in DynamoDB using Node.js3m 43s
-
(Locked)
Inserting data into DynamoDB using Node.js5m 28s
-
(Locked)
Insert data with transactions in DynamoDB using Node.js3m 57s
-
(Locked)
Querying data using Node.js6m 48s
-
(Locked)
Streams in DynamoDB9m 22s
-
(Locked)
-
-