Database Reference
In-Depth Information
Integration with other AWS components
As we have shown in the architecture diagram, we will also build a background job that
would periodically archive data, AWS S3. We can keep some buckets handy in order to
archive the data. To give an example, let's assume we want to archive data present in the
Questions and Answers tables to a bucket called QnA-backup on AWS S3. Then, you can
execute the following query on AWS EMR:
CREATE EXTERNAL TABLE Questions_2012 (topicName string,
question string, createdAt, postedBy)
STORED BY
'org.apache.hadoop.hive.dynamodb.DynamoDBStorageHandler'
TBLPROPERTIES ("dynamodb.table.name" = "Questions",
"dynamodb.column.mapping" = "topicName:topicName,
question:question,createAt:createdAt, postedby:postedBy");
Once the one-to-one mapping is done, we can execute INSERT into the command to ex-
port the S3:
INSERT OVERWRITE DIRECTORY 's3:// QnA-backup /questions/'
SELECT *
FROM Questions_2012;
For more details, you can refer to Chapter 6 , Integrating DynamoDB with other AWS Com-
ponents .
Search WWH ::




Custom Search