mardi 24 mars 2015

Experts! Can python boto to load nested documents in dynamo?

How to index nested documents using Boto into dynamo? Or is it even possible?


I tried the following but it just hangs...


CASE A



users.put_item(data={
'username': 'johnd',
'first_name': 'John',
'last_name': 'Doe',
'account': {'type': 'standard', 'age', '5'},
})


Along the same vein of nesting:


CASE B



users.put_item(data={
'username': 'johnd',
'first_name': 'John',
'last_name': 'Doe',
'account': {'type': {'level':1, 'class':'standard''}},
})


Can it support arrays?


CASE C



users.put_item(data={
'username': 'johnd',
'first_name': 'John',
'last_name': 'Doe',
'accounts': [{'account_name': 1}, {'account_name': 2}]
})


Can it support nested arrays?


CASE D



users.put_item(data={
'username': 'johnd',
'first_name': 'John',
'last_name': 'Doe',
'accounts': [{'account_name': 1, 'types':['Checking']}, {'account_name': 2, 'types':['Savings Standard', 'Savings Plus']}]
})


If not, are there alternatives in or outside of python? Or is this not possible?





Aucun commentaire:

Enregistrer un commentaire