From f5401906985dc2e4482ece8e2982d8836e973a01 Mon Sep 17 00:00:00 2001 From: Justin Taylor <15832750+jsdtaylor@users.noreply.github.com> Date: Thu, 7 May 2020 11:23:43 +0100 Subject: [PATCH] removing null values (#21) --- lib/index.ts | 4 +++- package.json | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/index.ts b/lib/index.ts index f4d8bc4..706f458 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -74,7 +74,9 @@ const run = async (filename, action) => { const seed = JSON.parse(data.Body.toString()); console.log('finished transforming seed data'); - const documentClient = new AWS.DynamoDB.DocumentClient(); + const documentClient = new AWS.DynamoDB.DocumentClient({ + convertEmptyValues: true + }); console.log('sending data to dynamodb'); for(let i = 0; i < seed.length;i++) { await documentClient[action]({ diff --git a/package.json b/package.json index 4d1e4e1..d2172f4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aws-cdk-dynamodb-seeder", - "version": "1.36.0", + "version": "1.36.1", "description": "A simple CDK JSON seeder for DynamoDB", "scripts": { "build": "jsii",