ejo
ejo

Reputation: 456

AWS DynamoDB select query with date range

Is it possible in AWS DynamoDB to query using date ranges? For example if I have table named students in MySQL we can do

SELECT * FROM students WHERE created_at > "2015-11-25 10:10:00" AND created_at < "2015-11-29 00:25:00"

I am relatively new to AWS DynamoDB. I understand it is completely different from RDBMS. But this particular requirement (querying using date ranges) will help me to migrate a huge amount of data to DynamoDB and save some cost. Any help on this is highly appreciated.

Notes:-

1) students is not the real table name.

2) I will be having more fields in this table other than created_at

3) My application will be REST APIs, which will be done either in RUBY or JAVA

Upvotes: 0

Views: 1549

Answers (1)

Hoang Phan
Hoang Phan

Reputation: 2166

I'm not sure about Java. But if you use ruby and this gem: https://github.com/Dynamoid/Dynamoid, you could query for greater/less than relations pretty much like Mongoid:

https://github.com/Dynamoid/Dynamoid#range-finding

Upvotes: 1

Related Questions