You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/hands-on-labs/explore-console/console-read-item-collection.en.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,8 +9,7 @@ Item Collections are groups of Items that share a Partition Key. By definition,
9
9
When we invoke the *Query* API we must specify a [Key Condition Expression](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Query.html#Query.KeyConditionExpressions). If we were comparing this to SQL, we would say "this is the part of the WHERE clause that acts on the Partition Key and Sort Key attributes". This could take a couple of forms:
10
10
11
11
* Just the Partition Key value of our Item Collection. This indicates that we want to read ALL the items in the item collection.
12
-
* The Partition Key value and some kind of Explore the other options in the Item explorer and figure out how to get queries to return with Replies sorted from most recent to least recent.
13
-
, >=, BETWEEN, and BEGINS_WITH.
12
+
* The Partition Key value and some kind of comparison against the Sort Key, such as >=, BETWEEN, or BEGINS_WITH.
14
13
15
14
The Key Condition Expression will define the number of RRUs or RCUs that are consumed by our Query. DynamoDB will add up the size of all the rows matched by the Key Condition Expression, then divide that total size by 4KB to calculate the consumed capacity (and then it will divide that number in half if you're using an eventually consistent read).
Copy file name to clipboardExpand all lines: content/hands-on-labs/explore-console/console-writing-data.en.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ Click `JSON view`, ensure `View DynamoDB JSON` is deselected, paste the followin
29
29
30
30
The DynamoDB [UpdateItem API](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html) is used to create a new item or to replace existing items completely with a new item. It is invoked using the [update-item CLI command](https://docs.aws.amazon.com/cli/latest/reference/dynamodb/update-item.html). This API requires you to specify the full Primary Key and can selectively modify specific attributes without changing others(you don't need to pass in the full item).
31
31
32
-
The DynamoDB [DeleteItem API](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DeleteItem.html) is used to create a new item or to replace existing items completely with a new item. It is invoked using the [delete-item CLI command](https://docs.aws.amazon.com/cli/latest/reference/dynamodb/delete-item.html).
32
+
The DynamoDB [DeleteItem API](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DeleteItem.html) is used to delete a single item from the table. It is invoked using the [delete-item CLI command](https://docs.aws.amazon.com/cli/latest/reference/dynamodb/delete-item.html).
33
33
34
34
You can easily modify or delete an item using the console by selecting the checkbox next to the item of interest, clicking the **Actions** dropdown and performing the desired action.
9. Go to [EC2 Dashboard](https://console.aws.amazon.com/ec2/v2/home?region=us-east-1#Instances:) and ensure the Status check column is 2/2 checks passed before moving to the next step.
19
+
9. Go to [EC2 Dashboard](https://console.aws.amazon.com/ec2/v2/home?region=us-west-2#Instances:) and ensure the Status check column is 2/2 checks passed before moving to the next step.
IMDb [(Internet Movie Database)](https://www.imdb.com/interfaces/) is one of the most recognized names for its comprehensive online database collection of movies, films, TV series and so on.
8
-
The exercise is going to use subset of IMDb dataset (available in TSV format). This workshop will utilize 6 IMDb dataset that are related to US based movies since year 2000.
9
-
The dataset has around 106K+ movies, ratings, votes and cast/crew information.
7
+
IMDb [(Internet Movie Database)](https://www.imdb.com/interfaces/) is Amazon's comprehensive online database of movies, films, and TV series.
8
+
The workshop uses 6 IMDb datasets related to movies made in the United States since the year 2000.
9
+
The dataset has over 106K movies, ratings, votes, and cast/crew information.
10
10
11
-
The CloudFormation template has launched EC2 Amazon Linux 2 instance with MySQL installed and running.
12
-
It has created imdb database, 6 new tables (one for each IMDb dataset), downloaded IMDb TSV files to MySQL server local directory and uploaded the files to 6 new tables. To explore dataset, follow below instructions to login EC2 server.
13
-
It has also configured a remote MySQL user based on the CloudFormation input parameter.
11
+
The CloudFormation template launched an EC2 Amazon Linux 2 instance with MySQL installed and running.
12
+
It created a MySQL database called `imdb`, added 6 new tables (one for each IMDb dataset), downloaded the IMDb TSV files to MySQL server local directory, and loaded the file contents into the 6 tables.
13
+
The CloudFormation template also configured a remote MySQL user based on input parameters for the template.
14
+
To explore the dataset, follow the instructions below to log in to the EC2 server.
14
15
15
-
1. Go to [EC2 console](https://console.aws.amazon.com/ec2/v2/home?region=us-east-1#Instances:instanceState=running)
16
-
2. Select the MySQL-Instance and click Connect
16
+
1. Go to [EC2 console](https://console.aws.amazon.com/ec2/v2/home?region=us-east-1#Instances:instanceState=running).
8. Go to AWS CloudFormation [Stacks](https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks?filteringStatus=active&filteringText=&viewNested=true&hideStacks=false) and click on the stack you created earlier. Go to the Parameters tab and copy the user name and password mentioned next to DbMasterUsername&DbMasterPassword
34
+
8. Go to AWS CloudFormation [Stacks](https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks?filteringStatus=active&filteringText=&viewNested=true&hideStacks=false) and click on the stack you created earlier. Go to the Parameters tab and copy the username and password listed next to "DbMasterUsername" and "DbMasterPassword".
10. Congratulations! You are now connected to a self-managed MySQL source database on EC2. In next steps, we will explore database and tables hosting IMDb datasets
41
+
10. Congratulations! You are now connected to a self-managed MySQL source database on EC2. In the following steps, we will explore the database and tables hosting IMDb datasets.
For illustration purpose, below is a logical diagram represents relationship between various source tables hosting IMDb dataset.
52
+
For illustration purposes, below is a logical diagram represents relationship between various source tables hosting IMDb dataset.
52
53
53
-
- `title_basics`table has movies published in US after year 2000. `tconst` is an alphanumeric key uniquely assigned to each movie.
54
-
- `title_akas` has published regions, languages and respective movie titles. It's 1\:many relationship with `title_basics` table.
55
-
- `title_ratings` has movies rating and vote count. For this exercise, we can assume the information has high frequency update post movie release. It's 1:1 related with `title_basics` table
56
-
- `title_principals` has cast and crew information. It's 1\:many relationship with `title_basics` table.
57
-
- `title_crew` has writer and director information. The table is 1:1 related with `title_basics` table.
54
+
- `title_basics` has movies published inthe US after the year 2000. `tconst` is an unique alphanumeric key assigned to each movie.
55
+
- `title_akas` has published regions, languages, and the respective movie titles. It has a 1\:many relationship with the`title_basics` table.
56
+
- `title_ratings` has movies rating and vote count. For this exercise, we can assume the information has high frequency updates post movie release. It has a 1:1 relationship with the `title_basics` table.
57
+
- `title_principals` has cast and crew information. It has a 1\:many relationship with the`title_basics` table.
58
+
- `title_crew` has writer and director information. It has a 1:1 relationship with the`title_basics` table.
58
59
- `name_basics` has cast and crew details. Every member has unique `nconst` value assigned.
12. We will create denormalized view with 1:1 static information and get it ready for migration to Amazon DynamoDB table. For now, go ahead and copy below code and paste into the MySQL command line.
62
-
The details around target data model will be discussed in the next chapter.
62
+
12. We will create a denormalized view with 1:1 static information and get it ready for migration to Amazon DynamoDB table. For now, go ahead and copy the code below and paste into the MySQL command line.
63
+
We will discuss the details around the target data model in the next chapter.
63
64
```bash
64
65
CREATE VIEW imdb.movies AS\
65
66
SELECT tp.tconst,\
@@ -87,7 +88,7 @@ CREATE VIEW imdb.movies AS\
87
88
LEFT JOIN imdb.name_basics nm ON tp.nconst = nm.nconst\
88
89
LEFT JOIN imdb.title_crew tc ON tc.tconst = tp.tconst;
89
90
```
90
-
Use below command to review count of records from the denormalized view. At this point, your source database is ready to migrate to Amazon DynamoDB.
91
+
Use thiscommand to check the count of records from the denormalized view. At this point, your source database is ready to migrate to Amazon DynamoDB.
0 commit comments