select itemName() from amazon simpledb using boto
-
22-06-2021 - |
Question
I'm trying to get itemName() from a simpleDB select query using boto, but doing select itemName() from domain where attribute = 'foo' limit 10
gives me an result set with 10 items but they are all empty.
I've also tried select `itemName()` from domain where attribute = 'foo'
and select itemName from domain where attribute = 'foo'
.
Solution
The Item objects returned are empty because you are not asking for any attributes in the query. The itemName is not really an attribute. It is stored as a special value on the Item object that is accessible as item.name.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow