java - Amazon DynamoDB table w/ Elastic Beanstalk not setting up correct parameters -


i have example dynamodb project amazon when uploaded instance of elastic beanstalk environment, generates dynamodb table. howevever, after generating table missing few parameters.

here code elastic beanstalk instance:

/*  * copyright 2010-2013 amazon.com, inc. or affiliates. rights reserved.  *   * licensed under apache license, version 2.0 (the "license").  * may not use file except in compliance license.  * copy of license located @  *   *  http://aws.amazon.com/apache2.0  *   * or in "license" file accompanying file. file distributed  * on "as is" basis, without warranties or conditions of kind, either  * express or implied. see license specific language governing  * permissions , limitations under license.  */  package com.amazonaws.geo.util;  import com.amazonaws.geo.geodatamanagerconfiguration; import com.amazonaws.services.dynamodbv2.model.attributedefinition; import com.amazonaws.services.dynamodbv2.model.createtablerequest; import com.amazonaws.services.dynamodbv2.model.keyschemaelement; import com.amazonaws.services.dynamodbv2.model.keytype; import com.amazonaws.services.dynamodbv2.model.localsecondaryindex; import com.amazonaws.services.dynamodbv2.model.projection; import com.amazonaws.services.dynamodbv2.model.projectiontype; import com.amazonaws.services.dynamodbv2.model.provisionedthroughput; import com.amazonaws.services.dynamodbv2.model.scalarattributetype;  /**  * utility class.  * */ public class geotableutil {      /**      * <p>      * construct create table request object based on geodatamanagerconfiguration. users can update aspect of      * request , call it.      * </p>      * example:      *       * <pre>      * amazondynamodbclient ddb = new amazondynamodbclient(new classpathpropertiesfilecredentialsprovider());      * region uswest2 = region.getregion(regions.us_west_2);      * ddb.setregion(uswest2);      *       * createtablerequest createtablerequest = geotableutil.getcreatetablerequest(config);      * createtableresult createtableresult = ddb.createtable(createtablerequest);      * </pre>      *       * @return generated create table request.      */     public static createtablerequest getcreatetablerequest(geodatamanagerconfiguration config) {         createtablerequest createtablerequest = new createtablerequest()                 .withtablename(config.gettablename())                 .withprovisionedthroughput(                         new provisionedthroughput().withreadcapacityunits(10l).withwritecapacityunits(5l))                 .withkeyschema(                         new keyschemaelement().withkeytype(keytype.hash).withattributename(                                 config.gethashkeyattributename()),                         new keyschemaelement().withkeytype(keytype.range).withattributename(                                 config.getrangekeyattributename()))                 .withattributedefinitions(                         new attributedefinition().withattributetype(scalarattributetype.n).withattributename(                                 config.gethashkeyattributename()),                         new attributedefinition().withattributetype(scalarattributetype.s).withattributename(                                 config.getrangekeyattributename()),                         new attributedefinition().withattributetype(scalarattributetype.n).withattributename(                                 config.getgeohashattributename()),                         new attributedefinition().withattributetype(scalarattributetype.s).withattributename(                                 config.getburumsgattributename()))                 .withlocalsecondaryindexes(                         new localsecondaryindex()                                 .withindexname(config.getgeohashindexname())                                 .withkeyschema(                                         new keyschemaelement().withkeytype(keytype.hash).withattributename(                                                 config.gethashkeyattributename()),                                         new keyschemaelement().withkeytype(keytype.range).withattributename(                                                 config.getgeohashattributename()))                                 .withprojection(new projection().withprojectiontype(projectiontype.all)));          return createtablerequest;     } } 

which should create table these parameters: hashkey rangekey geohash burumsg

and range/hash indices of: geohash , hashkey

however table constructs hash, range , geohash. never adds burumsg attribute.

any ideas?

edit:

here picture of me attempting insert item database on aws console. enter image description here

the schema of dynamodb tables specifies hash key, optional range key, , optional index keys. schema not cover attribute fields uninvolved in key or index. believe why burumsg field not appear in management console ui. can put data field, , observe in item listing in management console.

but defining attributes helpful client software, such java , .net orm libraries. there may nothing wrong code.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -