I am using DynamoDB under Python environment and I would like to use the following DynamoDB as an example:
id | time | value |
---|---|---|
1 | 1 | 1 |
2 | 2 | 3 |
1 | 2 | 4 |
1 | 3 | 4 |
1 | 4 | 6 |
- I would like to have a table that has unique id and time (not id or time).
- I would like to put entries from time to time. I would like the put operation would fail if there is an entry with the same id and time already exist in the table.
For the second criteria, I would like to know if I need to perform a get operation first or I could perform a write operation and, by table design, could raise an exception and then I ignore the exception (because the entry already exist in DynamoDB).