danishi / dynamodb-csv

A utility that allows CSV import / export to DynamoDB on the command line
https://danishi.github.io/dynamodb-csv/
MIT License
19 stars 4 forks source link

Add support for multi-word string imports in lists & sets #216

Closed daveharig closed 1 month ago

daveharig commented 2 months ago

Lists and sets delineate items with a space which limits the functionality to single word strings.

Would be valuable to support multi-word string imports by delineating with commas or quotes.

danishi commented 2 months ago

@daveharig Absolutely!

I plan to make changes so that the delimiter can be defined in the CSV_SPEC. Please wait a moment.

daveharig commented 2 months ago

Sounds great. For now I did this...

    elif spec == "SL":  # StringList
        return row[key].split('|')
    elif spec == "SS":  # StringSet
        return set(row[key].split('|'))
danishi commented 1 month ago

@daveharig Thank you for waiting!

I resolved this issue in version 1.5.4. It is already possible to install from PyPI.

Just add this to the spac file you are using.

[DELIMITER_OPTION]
DelimiterCharacter=|

I hope this helps you. And thank you so much for being my first GitHub sponsor💖