exam questions

Exam AWS Certified Big Data - Specialty All Questions

View all questions & answers for the AWS Certified Big Data - Specialty exam

Exam AWS Certified Big Data - Specialty topic 1 question 9 discussion

Exam question from Amazon's AWS Certified Big Data - Specialty
Question #: 9
Topic #: 1
[All AWS Certified Big Data - Specialty Questions]

A customer has an Amazon S3 bucket. Objects are uploaded simultaneously by a cluster of servers from multiple streams of data. The customer maintains a catalog of objects uploaded in Amazon S3 using an
Amazon DynamoDB table. This catalog has the following fileds: StreamName, TimeStamp, and ServerName, from which ObjectName can be obtained.
The customer needs to define the catalog to support querying for a given stream or server within a defined time range.
Which DynamoDB table scheme is most efficient to support these queries?

  • A. Define a Primary Key with ServerName as Partition Key and TimeStamp as Sort Key. Do NOT define a Local Secondary Index or Global Secondary Index.
  • B. Define a Primary Key with StreamName as Partition Key and TimeStamp followed by ServerName as Sort Key. Define a Global Secondary Index with ServerName as partition key and TimeStamp followed by StreamName.
  • C. Define a Primary Key with ServerName as Partition Key. Define a Local Secondary Index with StreamName as Partition Key. Define a Global Secondary Index with TimeStamp as Partition Key.
  • D. Define a Primary Key with ServerName as Partition Key. Define a Local Secondary Index with TimeStamp as Partition Key. Define a Global Secondary Index with StreamName as Partition Key and TimeStamp as Sort Key.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
mattyb123
Highly Voted 3 years, 7 months ago
Option B. You can use composite primary keys using a combination of (StreamName as the partition key and TimeStamp as the sort key) and (ServerName as the partition key and TimeStamp as the sort key) which would allow you to meet the requirements of the question.
upvoted 7 times
pra276
3 years, 7 months ago
How can you create this? Define a Primary Key with StreamName as Partition Key and TimeStamp followed by ServerName as Sort Key. You can create streamname as partition key and timestamp as sortkey and cannot be timestamp and servername together as sort key. The question tells customer needs to define the catalog to support querying for a given stream or Server. Here it is OR not mandatory to be both so better option i would think is A.
upvoted 1 times
muhsin
3 years, 6 months ago
I think b has typo . no need to have a sort key like in B. in my opinion, or means that both is needed but not at the same time.
upvoted 2 times
exams
3 years, 6 months ago
With all the confusion, I still think B is the answer
upvoted 1 times
...
...
mattyb123
3 years, 6 months ago
Can't you create a primary key on two fields so combine streamname + timestamp as hash/primary key then create the sort key on server name. Then you can create your GSI table with no problem. Just my thoughts, as the question is written quite badly to deceive you. When i attempted the test last time i did choose A but didnt score too well for Collection or Storage section so i was thinking B as it also you to look up the streamname.
upvoted 1 times
...
...
practicioner
3 years, 6 months ago
You are right in terms of the best approaches. Anyway, pay attention to this "and TimeStamp followed by ServerName as Sort Key" - this is absolutely wrong.
upvoted 1 times
...
...
Abhi09
Most Recent 3 years, 5 months ago
C and D - Wrong, because LSI wrongly mentioned with different partition key. LSI has same partition key. A - Wrong because it does not allow query based on stream name. GSI is must for this B - Correct by compromise, but phrasing is so messed up. I read it as below. Primary table : Partition Key : Stream Name, Sort Key : Timestamp, Attribute : Serrvername GSI : Partition Key: Server name, Sort Key: Timestamp, Attribute: Stream I read it like this because, "timestamp, followed by servername, as Sort key". Two comma missing, so Sort Key was mentioned for Timestamp, and followed by is a just a an additional attribute on same table , after sort key
upvoted 1 times
...
fw
3 years, 5 months ago
Option B. The sort key can be composite. Although it looks ugly. https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/bp-sort-keys.html
upvoted 3 times
...
Debi_mishra
3 years, 5 months ago
None of them are exact solution. A sounds more appropriate...but still doesnt address query using StreamName
upvoted 1 times
...
Bulti
3 years, 5 months ago
Refer to this link to confirm that you can create multiple LSIs on a table. https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LSI.html
upvoted 1 times
...
Bulti
3 years, 5 months ago
Option B. None of the option suggest the use of ServerName as a GSI which is requirement except for Option B. What is throwing people off is the phrase " TimeStamp followed by ServerName as Sort Key" and " TimeStamp followed by StreamName" in Option B. My interpretation is that it is suggesting we create 2 LSIs 1) TimeStamp 2) ServerName when StreamName is the partitionKey and similarly create 2 LSIs 1) TimeStamp and 2) StreamName when ServerName is the partitionKey. So I will go with Option B
upvoted 1 times
Corram
3 years, 5 months ago
Wording should be corrected: You don't create 2 LSI's, but one sort key (timestamp) and one LSI (ServerName or StreamName, resp.)
upvoted 1 times
...
...
YashBindlish
3 years, 5 months ago
B is the Correct Answer
upvoted 1 times
...
IDvarma
3 years, 5 months ago
Option A. (Read this section: Example 1: Working with log data) https://aws.amazon.com/blogs/database/using-sort-keys-to-organize-data-in-amazon-dynamodb/
upvoted 1 times
oscarchichun
3 years, 5 months ago
But it mentions "compound sort key" concept in Example 2: Working with chat messages, which seems to refer to option B.
upvoted 1 times
...
...
drneon
3 years, 6 months ago
B! Composite Primary Key = partitionKey+compositeSortKey StreamNmae + ServerName#TImeStamp, ServerName + StreamName#TimeStamp
upvoted 3 times
...
san2020
3 years, 6 months ago
my selection B
upvoted 2 times
...
ME2000
3 years, 6 months ago
Eliminate wrong answers. So A is the only visible and correct answer.
upvoted 1 times
...
d00ku
3 years, 6 months ago
A is correct since the requirement states Server OR Stream. Answer accommodates the requirement.
upvoted 1 times
venkataws
3 years, 6 months ago
Good catch so is the final answer A ?
upvoted 1 times
...
yuriy_ber
3 years, 6 months ago
"given stream or server within a defined time range" can be understood as query in different queries, not at the same time, especially in the context of DynamoDB with multiple possible query patters would make absolute sense
upvoted 2 times
...
...
asadao
3 years, 6 months ago
It is A
upvoted 1 times
...
M2
3 years, 6 months ago
for c and d, LSI & GSI both are not required for a, there is no way of querying streamname b is correct answer.
upvoted 1 times
...
pra276
3 years, 7 months ago
A is correct.
upvoted 2 times
...
muhsin
3 years, 7 months ago
no way of querying StreamName at option A. A is wrong
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago