Database Reference
In-Depth Information
Querying data in DynamoDB
There are multiple methods to query your data in DynamoDB. In this section, you will
learn the mapping method. The following example will find the largest order placed by a
given consumer:
CREATE EXTERNAL TABLE my_purchases(consumerId bigint,
total_cost double, items_purchased array<String>)
STORED BY
'org.apache.hadoop.hive.dynamodb.DynamoDBStorageHandler'
TBLPROPERTIES ("dynamodb.table.name" = "Purchases",
"dynamodb.column.mapping" =
"consumerId:ConsumerId,total_cost:Cost,items_purchased:Items");
SELECT max(total_cost) from my_purchases where consumerId =
666;
Search WWH ::




Custom Search