I am using local Amazon Dynamo DB and trying to create a table as; Id | StartPoint1 | EndPoint 1 | StartPoint2 | EndPoint2 | Speed | Distance
I tried using CreateTable() function but finding it difficult to create one. I am making use of .Net API.
Can anyone please help me out in getting this.
Sample code I tried was;
var response = client.CreateTable(new CreateTableRequest
{
TableName = tableName,
AttributeDefinitions = new List<AttributeDefinition>()
{
new AttributeDefinition
{
AttributeName = "Id",
AttributeType = "S"
},
new AttributeDefinition
{
AttributeName = "ReplyDateTime",
AttributeType = "S"
}
},
KeySchema = new List<KeySchemaElement>()
{
new KeySchemaElement()
{
AttributeName = "Id",
KeyType = "HASH"
},
new KeySchemaElement()
{
AttributeName = "ReplyDateTime",
KeyType = "RANGE"
}
},
ProvisionedThroughput = new ProvisionedThroughput
{
ReadCapacityUnits = 10,
WriteCapacityUnits = 5
}
});
For 2 columns it is working fine. For more than 2 columns, how to achieve this ?
Thanks and Regards, Vijay
I haven't used from C#, but seen that some APIs fail on local because you are accessing a new feature and using an older package of Dynamo DB. (One example is GSI, which is just couple of months old). This page always hosts the latest: http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tools.DynamoDBLocal.html (Earlier there was a place on the doc page, which by mistake kept hosting an older one)