In which language do you want to import the data? I just wrote a function in Node.js that can import a CSV file into a DynamoDB table. It first parses the whole CSV into an array, splits array into (25) chunks and then batchWriteItem into table. Note: DynamoDB only allows writing up to 25 records at a time in batchinsert. So we have to split our array into chunks.
68 Is it possible to export data from DynamoDB table in some format? The concrete use case is that I want to export data from my production dynamodb database and import that data into my local dynamodb instance so my application can work with local copy of data instead of production data.
I know the whole design should be based on natural aggregates (documents), however, I'm thinking to implement a separate table for localisations (lang, key, text) and then use keys in other tables.
You should keep the types when possible. Check the M S R's solution If you want to store the value as a Number type in DynamoDB, then you just need to convert the float to a Decimal. For example, if using the boto3 Table resource:
13 As of now the dynamoDB scan cannot return you sorted results. You need to use a query with a new global secondary index (GSI) with a hashkey and range field. The trick is to use a hashkey which is assigned the same value for all data in your table.
The documentation for DynamoDB has always been a challenge. I think the root cause of the problem here is the distinction between the base DynamoDB client and the higher-level Document Client.
I want to query the dynamodb table with boolean or condition like SQL e.g. Get me all the items where attribute1 = "no" or attribute2="no" I tried with scanRequest.withScanFilter but all the condi...
DynamoDB builds an unordered hash index on the hash attribute and a sorted range index on the range attribute. This means that every row's primary key is the combination of the hash and range key. You can make direct gets on single rows if you have both the hash and range key, or you can make a query against the sorted range index.