99x / 99x/serverless-dynamodb-local
Add possibility to add `convertEmptyValues` option
- Dominant language
- JavaScript
- Stars
- 621
- Forks
- 232
- PR merge metrics
- No merged PRs in 30d
Description
Great work guys!
It would be awesome if you would allow us to pass the convertEmptyValues option to the local dynamodb.
Currently whenever you try to migrate a json object with an empty string as a value, you'll get:
`One or more parameter values were invalid: An AttributeValue may not contain an empty string`
exception.
**Actual Behaviour**
Whenever you want to migrate the data with empty strings as values in it, e.g.
```
{
username: 'Joe',
name: ''
}
```
you'll get following exception:
`One or more parameter values were invalid: An AttributeValue may not contain an empty string`
**Expected Behaviour**
It would be great if it was possible to pass `convertEmptyValues: true` option while migrating the data.
**Steps to reproduce it**
Try to migrate the data with an empty string as a value.
**Screenshots of the issue**

Contributor guide
Research direction
Start by locating the local migration path that writes data to DynamoDB and identify where write options are passed. Reproduce the issue with an object containing an empty string, then verify that migration succeeds when the requested conversion option is enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, javascript
- Domain
- database
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100