99x / 99x/serverless-dynamodb-local

Add possibility to add `convertEmptyValues` option

Open
#169 2 comments 0 reactions 0 assignees View on GitHub
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**
screen shot 2018-06-22 at 4 16 49 pm

Contributor guide

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.