dynamodb-import-csv

simply import csv file into the dynamodb

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
dynamodb-import-csv
1.0.25 years ago5 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
}
} ```