DynamoDB: Table.create() with IncludeIndex duplicates RangeKey in Index Projection #1827

Open
mmacc opened this Issue Oct 30, 2013 · 1 comment

Comments

Projects
None yet
2 participants

mmacc commented Oct 30, 2013

Combined Table.create() and IncludeIndex examples from API page (http://boto.readthedocs.org/en/latest/ref/dynamodb2.html):

users = Table.create('users', 
    schema=[
        HashKey('username'),
        RangeKey('date_joined')
    ], 
    throughput={
    'read':2,
    'write': 1,
    }, 
    indexes=[
        IncludeIndex('GenderIndex', 
            parts=[
                HashKey('username'),
                RangeKey('date_joined')
            ], 
            includes=['gender']
        ),
    ], 
    connection=con)
)

AWS management panel after table creation (date_joined listed twice):

Projected Attributes
username, date_joined, date_joined, gender
Contributor

PauloMigAlmeida commented Apr 25, 2015

@mmacc I've tested the piece of code you've provided and this bug related to Projected Attributes is no longer happening. It might be possible that someone has already solved it.

I've tested with boto from 2.36 to the latest one.

screen shot 2015-04-25 at 2 35 49 pm

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment