-
-
Save sbower/8e7554b007c39127c4b99b569b640ee0 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
// describe the table and write metadata to the backup | |
dynamo.describeTable({TableName: tablename}, function(err, data) { | |
if (err) console.log(err, err.stack); | |
else { | |
table = data.Table | |
// Write table metadata to first line | |
data_stream.append(JSON.stringify(table)); | |
data_stream.append("\n"); | |
// limit the the number or reads to match our capacity | |
params.Limit = table.ProvisionedThroughput.ReadCapacityUnits | |
// start streaminf table data | |
dynamo.scan(params, onScan); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment