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'.

Was it helpful?

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
scroll top