dynamodb-import-csv

simply import csv file into the dynamodb

Stats

StarsIssuesVersionUpdatedCreatedSize
dynamodb-import-csv
001.0.22 years ago2 years agoMinified + gzip package size for dynamodb-import-csv in KB

Readme

Import csv file into AWS Dynamodb

This module help you to parse your exported dynamodb scv file into json object with data types.

Documentation will improve in future.

How to use

const  csvParse = require('dynamodb-import-csv'); // import npm module

//location of CSV file without beginning slash (/)
const path = 'sample.csv'; 

// parse CSV data into json format
// it will return json format with dynamodb data types
// if records more than 25, json array will split into 25 size chunk arrays

const jsonArray = await csvParse.parseSCVtoJSON(path);

Parsed return object array

{
  "totalItem": 60,
  "chunkSize": 25,
  "chunkCount": 3,
  "data": [
    [
        [object_1],
        [object_2],
        ... 
        [object_25],
    ],
    [
        [object_1],
        [object_2],
        ... 
        [object_25],
    ],
  ]
}

Sample parsed json object with data types

{
    "code": {
        "S": "N8"
    },
    "groups": {
        "L": []
    },
    "message": {
        "S": "sample message"
    },
    "id": {
        "N": 1
    }
}

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.