edasque / DynamoDBtoCSV

Dump DynamoDB data into a CSV file
Apache License 2.0
471 stars 152 forks source link

Unexpected token u in JSON at position 0 #64

Open nrmohan opened 4 years ago

nrmohan commented 4 years ago

Getting the following exception,

Unexpected token u in JSON at position 0

image

thanks

thomashzhang commented 4 years ago

I am also getting this issue. I've tried the following commands, all producing the same error:

node dynamoDBtoCSV.js -t <table> node dynamoDBtoCSV.js -t <table> -d node dynamoDBtoCSV.js -t <table> -c

I did make sure to run npm install first. Thanks!

tmsdnl commented 4 years ago

Tool is expecting “keyExpressionValues” argument.

Add -v “{}” as an argument. I also recommend adding region.

gminn commented 3 years ago

I had the same issue and node dynamoDBtoCSV.js -t table_name -v "{}" worked for me (replace table_name with your table name)! I then added > output.txt to redirect the output (instead of printing to the terminal). {} is where you specify the query, but you can leave it as {} and it will grab everything.