Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set order of columns in DynamoDB table of AWS

I'm newbie on Amazon web services cloud. I'm trying to store my data to aws DynamoDB table. I have created table into DynamoDB using python script. Please show below snapshot.

aws

In the table, order of columns doesn't showing according to my requirements. I want to order of columns something like,

Rpi_ID    RowKey    Name         Time            Date

A100       1        msc       02:07:18 PM       01-04-2017

So, how to set columns according to my requirements?

my pythons put item code:

Table.put_item(
           Item={
            'RowKey': 1,            
            'Rpi_ID': 'A100',
            'Name': 'msc',
            'Time': time.strftime("%I:%M:%S %p"),
            'Date': time.strftime("%d-%m-%Y"),
            }
        )

Please help me. Thanks in advance.

P.S: Sorry for my poor english.

like image 234
msc Avatar asked Apr 01 '17 09:04

msc


People also ask

Does DynamoDB maintain order?

DynamoDB Streams doesn't preserve order for items in TransactWriteItems.

Is DynamoDB column-oriented?

Apache Cassandra is a column-oriented data store, whereas Amazon DynamoDB is a key-value and document-oriented store.

How does DynamoDB organize data?

So DynamoDB stores the item among the others with the same partition key, in ascending order by sort key. To read an item from the table, you must specify its partition key value and sort key value. DynamoDB calculates the partition key's hash value, yielding the partition in which the item can be found.


1 Answers

Amazon DynamoDB is a NoSQL database. It does not use the concept of columns. This is because each item (row) can have different data. The management console attempts to show the data in columns to make it easier for us humans to read.

When retrieving data from DynamoDB, you can request specific keys (eg Name), or you can receive a JSON object from which you can parse the necessary information based on the Key and Value.

like image 120
John Rotenstein Avatar answered Sep 20 '22 04:09

John Rotenstein