-
-
Save sbower/7cc164fc3e3f18db62773e99e212508c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function onScan(err, data) { | |
if (err) console.log(err, err.stack); | |
else { | |
for (var idx = 0; idx < data.Items.length; idx++) { | |
data_stream.append(JSON.stringify(data.Items[idx])); | |
data_stream.append("\n"); | |
} | |
if (typeof data.LastEvaluatedKey != "undefined") { | |
params.ExclusiveStartKey = data.LastEvaluatedKey; | |
dynamo.scan(params, onScan); | |
} | |
else { | |
data_stream.end() | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment