Git Product home page Git Product logo

Comments (8)

edasque avatar edasque commented on July 18, 2024

What do you mean, can you run the command and copy out the input and output here?

from dynamodbtocsv.

 avatar commented on July 18, 2024

I run:

node dynamoDBtoCSV.js -t TableName > result.csv

And on the csv i see:

get

But this 'dummy' line isn't on my dynamoDB its added by the code.

from dynamodbtocsv.

edasque avatar edasque commented on July 18, 2024

@tcchau can you speak to that? Seems that line wasn't unmarshalled correctly, causing dummy rows to be inserted in its place?

from dynamodbtocsv.

tcchau avatar tcchau commented on July 18, 2024

@edasque @MarcoPorracin Hi there. Yes, sorry, I didn't have enough time to solve the original problem completely.

Let me explain: The original problem is that if you have a table that uses a variable set of attributes for items, the first item that is retrieved by dynamoDBtoCSV will define the set of attributes that will be output. That is, if some of your items have an attribute called, 'optionalData', but not the first item, then 'optionalData' from any other item will not be included in the output.

The fastest way for me to resolve this problem was to create a dummy first item that contains every possible attribute that exists in any item in the whole table.

The proper fix would have been to fix the output generation code so that it is aware that we're working with items that may contain additional attributes.

If I have time later on this month, I can work on that, but if someone else can get to it first, by all means!

from dynamodbtocsv.

edasque avatar edasque commented on July 18, 2024

So @tcchau that line just has to be excluded from the CSV output (or just removed from that doc)?

from dynamodbtocsv.

tcchau avatar tcchau commented on July 18, 2024

Yes, @edasque, I just remove it from my CSV output file manually, since I only occasionally run such a report.

from dynamodbtocsv.

tcchau avatar tcchau commented on July 18, 2024

@MarcoPorracin @edasque It turns out, upon reviewing the papaparse library documentation a little more closely, there's a way to eliminate the need for the dummy row fairly easily. I've issued a pull request to fix this #32

from dynamodbtocsv.

 avatar commented on July 18, 2024

Fixed on pull request #32

from dynamodbtocsv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.